60 627
Assignments Done
97,8%
Successfully Done
In April 2018

Answer to Question #16054 in C++ for mark

Question #16054
how do i create a c++ program that will diplay my name three times using a while loop. Thanks
Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions