Data Journey

International Studies Grad. racing for AI Engineer

Download as .zip Download as .tar.gz View on GitHub
8 January 2021

Userinput

by mervyn

#Probelm Write a program that takes two numbers as input, assigns those values to the provided a and b variables, then outputs their sum.

Sample Input 24 48

Sample Output 72

#include <iostream>
using namespace std;

int main() {
    int a;
    int b;
    // your code goes here
    cin>>a;
    cin>>b;
    int sum = a + b;
    cout<< sum << endl;
    return 0;
}
tags:

Comments

Post comment
Loading...

Share this: