您的位置:首页 > 其它

自学第七十九天

2021-02-14 22:55 831 查看
//#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;
//}


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: