Answer to Question #23375 in C++ for Nain_952

Question #23375
write a program that inputs 3 digits nmbr and display its digit in separate three lines?
1
Expert's answer
2013-01-30T11:02:40-0500
#include <iostream>
using namespace std;
#include <string>
int main(){
cout<<"Enter three digits there:\n";
string a;
cin>>a;
for (int i = 0 ; i < 3 ; i++){
cout<< a[i] << endl;
}
system ("pause");
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS