关于C语言的弱智问题!很急!帮帮忙吧!

来源:百度知道 编辑:UC知道 时间:2024/06/03 07:46:04
编程要求:Mike, 20 years old, has a monthly income 3500 yuan. Carol, 19 years old,
has a monthly income 2000 yuan. Please input the age and monthly income
information of Mike and Carol and output the formatted information. The
name, age and monthly income information of a person should be displayed
in the same line. Monthly income should have have two digits after the
decimal point. The output should be vertically aligned.代码写一下,谢谢了!

呵呵~~好像没人愿意写这么简单的东西了,我帮你写了。
#include "stdio.h"
void main()
{
int age_M,age_C;
float income_M,income_C;
printf("Please input the age of Mike:");
scanf("%d",&age_M);
printf("Please input the monthly income of Mike:");
scanf("%f",&income_M);
printf("Please input the age of Carol:");
scanf("%d",&age_C);
printf("Please input the monthly income of Carol:");
scanf("%f",&income_C);
printf("\nname\tage\tmonthly income\nMike\t%d\t%.2f\nCarol\t%d\t%.2f\n",age_M,income_M,age_C,income_C);
return 0;
}

C语言!我很久没有用了。可以用链表来做!很简单的。

你很弱智,问这么弱智的问题