//第一题
#include<stdio.h>
int main()
{
int int_max = 2147483647 ;
printf("%d %d\n",int_max,int_max+1);
float float_max = 3.40e38;
printf("%f %f",float_max,float_max+1);
float float_min = 3.40e-38;
printf("%f %f",float_min,float_min-1);
}
//第二题
#include <stdio.h>
int main()
{
printf("please enter a ASCII\n");
int ASCII;
scanf("%d",&ASCII);
printf("%d ASCII is related to %c",ASCII,ASCII);
}
//第三题
#include <stdio.h>
int main()
{
printf("\a\n");
printf("Startled by the sudden sound,Sally shouted,\n");
printf("\"By the Great Pumpkin,what was that!\"");
}
//第四题
#include <stdio.h>
int main()
{
printf("Enter a floating-point value: ");
float t;
scanf("%f",&t);
printf("fixed-point notation: %f\n",t);
printf("exponential notation: %e\n",t);
printf("p notation: %#a",t);
}
//第五题
#include <stdio.h>
int main()
{
printf("Enter your age");
int age;
scanf("%d",&age);
printf("your age is corresponding %f seconds",age*3.156e7);
}
//第六题
#include <stdio.h>
int main()
{
printf("Please enter the quart of water:");
int quart_water;
scanf("%d",&quart_water);
printf("%d quart of water have %f water molecules",quart_water,quart_water*950/3.0e-23);
}
//第七题
#include <stdio.h>
int main()
{
printf("Please enter your height in inch");
int heigh;
scanf("%d",&heigh);
printf("your heigh in centimeters is %f",heigh*2.54);
}
//第八题
#include <stdio.h>
int main()
{
printf("Please enter the volume in cup:");
int cup;
scanf("%d",&cup);
printf("the cups in pint is:%f\n",cup*0.5);
printf("the cups in ounce is:%d\n",cup*8);
printf("the cups in table_spoons is:%d\n",cup*8*2);
printf("the cups in tea_spoons is:%d\n",cup*8*2*3);
}