I have tried to answer this thirty different ways, and I am pretty sure I just don't know exactly what the question is asking me to do..
Two variables , num and cost have been declared and given values : num is an integer and cost is a double . Write a single statement that outputs num and cost to standard output . Print both values (num first, then cost), separated by a space on a single line that is terminated with a newline character . Do not output any thing else.
Two variables, num and cost have been declared and given values: num is an integer, and cost is a double.
1 2 3 4 5
int main()
{
int num = 44;
double cost = 87.55;
}
Using std::cout, write num, followed by a space, followed by cost, followed by '\n' to the standard output.
1 2 3 4 5 6 7
#include <iostream>
int main()
{
int x = 97;
std::cout << "this is how" << "we use std::cout " << x << "\n";
std::cout << "printed on the next line";
}
this is howwe use std::cout 97
printed on the next line