C Primer Plus 编程练习 第二章

#include<stdio.h>
int main(void)
{
	printf("Gustav Mahler\n");
	printf("Gustav\n");
	printf("Mahler\n");
	printf("Gustav Mahler");
	getchar();
	return 0;
}
#include<stdio.h>
int main(void)
{
	printf("我的姓名是:XX,我的地址是:XXXXXXXXXXXXXXX");
	getchar();
	return 0;
}
#include<stdio.h>
int main(void)
{
	int age, days;
	printf("请输入年龄:");
	scanf("%d", &age);
	days = age * 365;
	printf("%d岁对应的天数是:%d", age, days);
	getchar();
	getchar();
	return 0;
}
#include<stdio.h>
void jolly();
void deny();
int main(void)
{
	jolly();
	jolly();
	jolly();
	deny();
	getchar();
	return 0;
}
void jolly()
{
	printf("For he's a jolly good fellow!\n");
}
void deny()
{
	printf("Which nobody can deny!\n");
}
#include<stdio.h>
void br();
void ic();
int main(void)
{
	br();
	printf(",");
	ic();
	printf("\n");
	ic();
	printf(",\n");
	br();
	getchar();
	return 0;
}
void br()
{
	printf("Brazil, Russia");
}
void ic()
{
	printf("India, China");
}
#include<stdio.h>
int main(void)
{
	int toes;
	int square, cube;
	toes = 10;
	square = toes*toes;
	cube = toes*toes*toes;
	printf("%d的平方是:%d,立方是:%d", toes, square, cube);
	getchar();
	return 0;
}
#include<stdio.h>
void smile();
int main(void)
{
	smile();
	smile();
	smile();
	printf("\n");
	smile();
	smile();
	printf("\n");
	smile();
	getchar();
	return 0;
}
void smile()
{
	printf("Smile!");
}
#include<stdio.h>
void one_three();
void two();
int main(void)
{
	printf("starting now:\n");
	one_three();
	printf("done!");
	getchar();
	return 0;
}
void one_three()
{
	printf("one\n");
	two();
	printf("three\n");

}
void two()
{
	printf("two\n");
}
上一篇:CF145E Lucky Queries


下一篇:2021.9.20考试总结[NOIP模拟57]