0
write c++ program to read integer number and print the equivalent string ..e.g 0zero 1one 2 two..............
c++
8 Respostas
+ 4
What have you tried?
+ 3
#include <iostream>
using namespace std;
int main() {
while (true) {
int a = -1;
cin >> a;
if (a == -1) break;
cout << (char)a << endl;
}
}
0
A string will look the same as an integer on the console. Also, the ostream class converts every type to chars for storing inside a character buffer and printing on the console. So the difference will be seen only inside the code, nowhere else.
And to convert int to string, use to_string() or stringstream.
0
write a program to read X and print sin X ifX>0 square rootX f<0 and absoluteX ifX/2 is integer
0
0
0
0
write c++ program to read integer number and print the equivalent string e.q zero one two