0

how to call for enter value instead of this way which just print without asking the value as expected

#include <iostream> using namespace std; int main () { int i; cout << "Please enter an integer value: "; cin >> i; cout << "The value you entered is " << i; cout << " and its double is " << i*2 << ".\n"; return 0; }

20th Apr 2017, 2:24 PM
Thierry Stay
Thierry Stay - avatar
1 Odpowiedź
0
am i getting you right you want a function which outputs text and at the same time gets a value inputed by the user?
24th Apr 2017, 6:57 PM
Jprom
Jprom - avatar