[ad_1]
You can only read into a variable:
std::cin >> x;
but you can output the value of any (suitably typed) expression:
std::cout << sqr(x);
13
[ad_2]
solved I am getting an error regarding std::istream and int x [closed]
[ad_1]
You can only read into a variable:
std::cin >> x;
but you can output the value of any (suitably typed) expression:
std::cout << sqr(x);
13
[ad_2]
solved I am getting an error regarding std::istream and int x [closed]