用户:
爵士OIer查看:9 回复:9 评论:9 创建时间:2018-07-21T17:35:57
写代码是有规矩的:
括号要成对出现,如
xxxxxxxxx(xx xx xx xx);
或
xxxxxxxx{
xxxxxxxxxxxx;
}
每一行写完,都要打分号;
等等。
* * * * *
#include <iostream>
int main()
{
std::cout << "Enter tow numbers:" <<std::endl;
int v1, v2;
std::cin >> v1 >> v2;
std::cout << "The sum of " << v1 << " and " << v2
<< " is " << v1 + v2 << std::endl;
return 0;
}
程序首先显示提示
Enter tow numbers
输入3 7
系统自动求和:
10
这是第2期。再见!
#include<stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char name[100];
scanf("%c",name)
printf("hello %c",name);
return 0;
}
这才叫 精简
点赞0
评论