- 8
How to print "hello world" 10 times using c++
12 ответов
+ 2
#include <iostream>
using namespace std;
int main()
{
string name;
cout << "Enter ur name \n";
cin >> name;
for (int counter = 0; counter < 10; counter++)
{
cout << name << endl;
}
}
0
Thanks
0
Thanks
0
thanks
0
how to write program that enter 15 number and print the product ?
0
#include<iostream>
using namespace std;
int main()
{
int i;
while(i<10)
{
cout<<"Hello World!";
cout<<"\n";
i++;
}
}
- 1
You can use loop. For example;
int num=0;
while(num<10){
cout<<"Hello World \n";
num++;
- 1
int num=10;
for(int i=0;i<10;i++)
{
cout<<"hello world...!!"<<endl;
}
- 1
int num=10;
for(int i=0;i<10;i++)
{
cout<<"hello world...!!"<<endl;
}
- 1
how to write program that enter 15 number and print the product ?
- 1
how to write program that enter 15 number and print the product ?
- 2
Print hello world 10 times without using any loops in c++