Write a program that requests the user’s first name and then the user’s last name. Have
it print the entered names on one line and the number of letters in each name on the
following line. Align each letter count with the end of the corresponding name, as in the
following:
Melissa Honeybee
7 8
Next, have it print the same information, but with the counts aligned with the beginning of each name.
Melissa Honeybee
7 8
=> 근데 이게 성과 이름의 끝 글자에, 혹은 첫글자에 맞추어 출력해야하는데 어떻게 조정해야할지를 모르겠네요 ㅠㅠ
7. Write a program that sets a type double variable to 1.0/3.0 and a type float variable
to 1.0/3.0. Display each result three times—once showing four digits to the right of the
decimal, once showing 12 digits to the right of the decimal, and once showing 16 digits
to the right of the decimal. Also have the program include float.h and display the
values of FLT_DIG and DBL_DIG . Are the displayed values of 1.0/3.0 consistent with these
values?
8. Write a program that asks the user to enter the number of miles traveled and the number
of gallons of gasoline consumed. It should then calculate and display the miles-per-gallon
value, showing one place to the right of the decimal. Next, using the fact that one gallon
is about 3.785 liters and one mile is about 1.609 kilometers, it should convert the mileper-
gallon value to a liters-per-100-km value, the usual European way of expressing fuel
consumption, and display the result, showing one place to the right of the decimal. Note
that the U. S. scheme measures the distance traveled per amount of fuel (higher is better),
whereas the European scheme measures the amount of fuel per distance (lower is better).
Use symbolic constants (using const or #define ) for the two conversion factors.
=> 여기 까지는 소스를 꾸역꾸역 짜봤는데
갤런당 마일 수를 유럽 스타일인 100킬로미터 당 리터 수로 변환하여 그 결과를 소수점 아래 1자리까지 출력해야한다. 를 어떻게 해야하나요 ?
%.1lf 로 표현하면 될 것 같은데 어떻게 해야하나요?



문제가 발생했을 때 너 스스로 해결할 힘 정도는 길러야 하지 않겠니
근데 검색을해도 안나오는게 많아서요 ..
문자출력도 숫자 자리수처럼 똑같음
근데 이게 이름을 매번 입력하는게 다르자나요 어쩔땐 문제처럼 7자,8자 할수있으니 %7.1s 하면되는데 이 숫자가 매번 바뀌니 이걸 어케해야하는지 모르겠어요
그러면 별찍기처럼 스페이스 반복문 돌리는 방식으로 해
두번째 질문은 될 것 같다면서 뭐가 문제인지 모르겠다
그 위가 문제에요 갤런당 마일 수를 유럽스타일인 100KM당 리터수로 변환하는걸 어떻게 소스를 짜야하나요 ?
분수문제 푸는 거 배웠잖아. 100 킬로미터당 몇 갤런을 소비하는지 보고. 갤런을 리터로 바꿔. 내가 실력이 없다보니까 좀 구린 방법일 것도 같은데
2번째꺼는 그냥 일일이 변환밖에 답이없나요 ? 다른 간단한 방법이 있는 줄 알았습니다 ㅠㅠ..
음청 쉬워보이는데 하기 귀찮아보임 ㅋ
이건 너무쉬워서 도와주면 욕먹을듯 첫번째거는 반복문 두번째거는 간단한 사칙연산 끝
2번째꺼는 그냥 일일이 변환밖에 답이없나요 ? 다른 간단한 방법이 있는 줄 알았습니다 ㅠㅠ.. 반복문 감사합니다!
두번 째 꺼 못하시면 초중고 수학 다시 한 번 빠르게 복습하시는 것도 나쁘지 않을 것 같습니다.
2번째꺼는 그냥 일일이 변환밖에 답이없나요 ? 다른 간단한 방법이 있는 줄 알았습니다 ㅠㅠ..