c++学习:输入信息和输出信息

版权声明:本文为博主原创文章,转载请注明来源 https://blog.csdn.net/qq_26948675/article/details/88655722
#include <iostream>
#include <stdlib.h>  
using namespace std;
 
int main( )
{
    char name[50];
    int a,b,c;
    cout << "what's your name: ";
    cin >> name;
    cout << "your name is: " << name << endl;
    cout << "calculate add function,write a";
    cin >> a;
    cout << "calculate add function,write b";
    cin >> b;
    c=a+b;
    cout << a << '+' << b << "=" << c << endl;
    system("pause");   
} 

猜你喜欢

转载自blog.csdn.net/qq_26948675/article/details/88655722
今日推荐