+ 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 }
5 ответов
+ 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;
}
+ 5
Have you attempted it?..
+ 4
You can write
int num1,num2;
instead of
int num1=0;
int num2=0;
0
I am so sorry these did not help me
0
I am so sorry these did not help me