第一次作业
一、我爱学习c语言(P5)
#include<stdio.h> main() { printf("我爱学习C语言\n"); }

二、分行输出自己的专业与姓名
#include<stdio.h> main() { printf("计算机科学与技术\n孔德俊\n计算机2105班\n"); }

三、用*号输出字母c的图案
#include<stdio.h> main() { printf(" *\n *\n *\n *\n *\n *\n *\n"); }

-
编写程序,定义两个整型变量,赋值并输出(P18)
#include<stdio.h> main() { int a, b; a = 5; b = 8; printf("a=%d b=%d", a, b); }

-
编写程序,定义一个单精度和一个双精度的变量,赋值并输出
#include<stdio.h> main() { float a = 1.2; double b = 2.3; printf("a=%f b=%f", a, b); }


浙公网安备 33010602011771号