C语言程序设计题

课本题目1,2,4。求学霸答案
2024-12-27 08:55:38
推荐回答(1个)
回答1:

#include main() { float dollar; float hour; float a; float b; float c; printf("your salary is:"); scanf("%f,&dollar); printf("working hour:"); scanf("%f,&hour); a=dollar/hour; b=a-(int)a; c=a-b; printf("your average hourly pay rate is %.0f dollars and %.0f cents",c,100*b); return 0; }