Â
In this, we are going to see for loop, the program is based on for loop which basically, prints a character defined by user 10 times.
The code given below can be used for TURBO C++ Compiler:-
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i;
for(i=0;i<=9;i++)
{
cout<<"@"<<endl;
}
getch();
}
The code given below can be used for g++/gcc Compiler:-
#include<iostream>
using namespace std;
int main()
{
int i;
for(i=0;i<=9;i++)
{
cout<<"@"<<endl;
}
return 0;
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP