输出hello world!
1 #include <stdio.h> 2 int main() 3 { 4 5 printf("hello world!"); 6 7 return 0; 8 }
两个变量
#include <stdio.h>
int main()
{
int amount=100;
int price=0;
printf("请输入金额(元):");
scanf("%d",&price);
printf("请输入票面:");
scanf("%d",&amount);
int change=amount-price;
printf("找您%d元。",change);
// ---------------------------------------------------------
int a=0;
int b=0;
printf("请输入两个整数:");
scanf("%d %d",&a,&b);
printf("%d+%d=%d\n",a,b,a+b);
return 0;
}
标签:第一天,int,scanf,学习,amount,printf,main,price From: https://www.cnblogs.com/vv-77/p/17237786.html