Answer to Question #16054 in C++ for mark
how do i create a c++ program that will diplay my name three times using a while loop. Thanks
1
2012-10-11T08:31:37-0400
#include <iostream>
using namespace std;
int main() {
char name[30];
cout << "Enter your name: ";
cin >> name;
cout << endl;
int k = 0;
while (k < 3) {
& cout << name << endl;
& k++;
}
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment