第一题代码
#include<stdio.h>
int main()
{
printf(" *\n");
printf(" *\n");
printf(" *\n");
printf("* *\n");
printf(" * *\n");
printf(" *\n");
return 0;
}
第2题代码
#include<stdio.h>
#define FREEZING (4.0f/3.0f)
int main()
{
float r = 0;
r = 10 * 10 * 10;
float v = 0;
v = (3.14*FREEZING) * r;
printf("%f\n", v);
return 0;
}
第三题了代码
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define FREEZING (4.0f/3.0f)
int main()
{
int r = 0;
scanf("%d", &r);
float v = 0;
v = (3.14 * FREEZING) * r * r * r;
printf("%f\n", v);
return 0;
}
第4题代码
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define FREEZING (4.0f/3.0f)
int main()
{
float m;
scanf("%f", &m);
float s;
s = m + m * 0.05;
printf("Enter an amount: %f\n", m);
printf("With tax added; %f\n", s);
return 0;
}
第五题代码
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define FREEZING (4.0f/3.0f)
int main()
{
float x;
scanf("%f", &x);
float z;
z = 3 * (x * x * x * x * x) + 2 * (x * x * x * x) - 5 * (x * x * x) - x * x + 7 * x - 6;
printf("%f", z);
return 0;
}