下面程序的功能是:从键盘输入两个整数,输出这两个整数的差。请根据注释信息填写完整程序,使程序实现其功能。运行程序,观察并记下屏幕的输出结果。#includevoidmain(){inta,b,m;printf("Inputa,bplease!”);scanf("%d%d",&a,&b);/*赋值语句,将a和b的差值赋给m*//*输出a和b差的结果值后换行*//*输出OK!*/}
查看答案
#includevoidmain(){printf("WELCOME!FRIEND.\n");}程序运行结果是.
#includevoidmain(){inta1=6,a2=9;printf(“%d,a2=%d\n",a1,a2);a1=a1+a2;a2=a1-a2;a1=a1-a2;printf("a1=%d,a2=%d\n",a1,a2);}程序运行结果是.
#includevoidmain(){intx=12,y=16,z;printf("x=%d,y=%d\n”,x,y);z=x;x=y;y=z;printf("x=%d,y=%d\n",x,y);程序运行结果是.
#includevoidmain(){inta=2,b=3,c=4;printf("a=%d,b=%d,c=%d\n"a,b,c);printf("sum=%d\n",a+b+c);}程序运行结果是