How to write code in C++
|
Input data must be read from console and the result must be written to console as well. The main function should return zero.
Example. Create a program which calculates the sum of two integer numbers.
Sample input:
5 3
Sample output:
8
Sample code:
Example. Create a program which calculates the sum of two integer numbers.
Sample input:
5 3
Sample output:
8
Sample code:
#include <iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
cout<<a+b;
return 0;
}