Q:

Comment pairs generally are used for multiline explanations, whereas double-slash comments tend to be used for half-line and single-line remarks

0

Comment pairs generally are used for multiline explanations, whereas double slash comments tend to be used for half-line and single-line remarks.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <iostream>
/*
* Simple main function:
C++ Primer, Fifth Edition
* Read two numbers and write their sum
*/
int main()
{
// prompt user to enter two numbers
std::cout << "Enter two numbers:" << std::endl;
int v1 = 0, v2 = 0; // variables to hold the input we read
std::cin >> v1 >> v2; // read input
std::cout << "The sum of " << v1 << " and " << v2
<< " is " << v1 + v2 << std::endl;
return 0;
}

 

Output:

Enter two numbers:
3 7
The sum of 3 and 7 is 10

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now