//#include<stdio.h> //int main() //{ // float aboat = 32000.0; // double abet = 2.14e9; // long double dip = 5.32e-5; // printf("%f can be written %e\n", aboat, aboat); // printf("And it's %a in hexadecimal, powers of 2 notation\n", aboat); // printf("%f can be written %e\n", abet, abet); // printf("%Lf can be written %Le\n", dip, dip); // return 0; //} //#include<stdio.h> //int main() //{ // float salary; // printf("\aEnter your desired monthly salary:");//\a是发生一声警报 // printf("$_______\b\b\b\b\b\b\b");//\b是向左移动一格 // scanf("%f", &salary); // printf("\n\t$%.2f a month is $%.2f a year.", salary, salary * 12.0);//\t意思是水平制表符使光标移至该行的下一个制表点,一般是第9列 // printf("\rGee!\n");//\r意思是使光标回到当前行的起始处 // return 0; //} //#include<stdio.h> //#include<string.h> //#define DENSITY 62.4//定义一个宏【注意】后面没有分号。 //int main() //{ // float weight, volume; // int size, letters; // char name[40]; // printf("Hi! What's your first name?\n"); // scanf("%s", &name); // printf("%s, What's your weight in pounds?\n", name); // scanf("%f", &weight); // size = sizeof(name); // letters = strlen(name); // volume = weight / DENSITY; // printf("Well,%s,your volume is %2.2f cubic feet.\n", name, volume); // printf("Also, your first name has %d lettes,\n", letters); // printf("and we have %d bytes to store it.\n", size); // return 0; //}
自学第七十九天
猜你喜欢
转载自blog.51cto.com/15019599/2628709
今日推荐
周排行