《程序设计基础》实验报告
int main()
{
float a, b;
printf_s("please input cost price of TV:");
scanf_s("%f", &a);
b = a*K;
printf_s("the current price of TV:");
printf_s("%f", b);
return 0;
2.
#include"stdafx.h"
int main()
{
int a, b, c, d, e, f;
printf_s("please input three figures:");
scanf_s("%d", &a);
b = a / 100;
c = a % 100;
d = c / 10;
e = c % 10;
f = e * 100 + d * 10 + b;
printf_s("the new three figures:");
printf_s("%d", f);
return 0;
}
3.
#include"stdafx.h"
int main()
{
float a, b, c, d, e;
printf_s("please input scores:\n");
scanf_s("%f%f%f", &a, &b, &c);
d = a + b + c;
e = (a + b + c) / 3;