+ 2

Add the missing lines of a program

Complete the program by entering the missing statements. Input: Two numbers Example Input: 50, 100 Produce the following Example Output: You entered 50 and 100 ------------------------- int main() { int num1 = 0; int num2 = 0; cout << "Enter a number: "; //missing instruction. cout << "Enter a second number: "; //missing instruction //missing output instruction }

19th Oct 2017, 2:30 AM
itsTommee
itsTommee - avatar
5 Respostas
+ 6
#include<iostream> using namespace std; int main() { int num1 = 0; int num2 = 0; cout << "Enter a number: "; cin>>num1; cout << "Enter a second number: "; cin>>num2; cout <<"You entered <<num1<<" and "<<num2; }
19th Oct 2017, 2:57 AM
Lakshay
Lakshay - avatar
+ 5
Have you attempted it?..
19th Oct 2017, 2:56 AM
Rrestoring faith
Rrestoring faith - avatar
+ 4
You can write int num1,num2; instead of int num1=0; int num2=0;
19th Oct 2017, 2:58 AM
Lakshay
Lakshay - avatar
0
I am so sorry these did not help me
29th Dec 2020, 10:31 AM
Diwash Bhandari
Diwash Bhandari - avatar
0
I am so sorry these did not help me
3rd Jun 2021, 7:34 AM
Aarti Gaware
Aarti Gaware - avatar