write a C++ programming using for loop:
*
* *
* * *
* * * *
Answers were Sorted based on User's Feedback
Answer / debotri das
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int line,n,i;
cout<<"Enter no of line\n";
cin>>n;
for(line=1;line<=n;line++)
{
for(i=1;i<=line;i++)
{
cout<<" * ";
}
cout<<" \n ";
}
getch();
}
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / devi
#include<iostream.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++)
{
cout<<"*";
}
cout<<"\n";
}
getch();
}
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / amit
void main()
{
int i,j;
for(i=1;i<=4;i++)
{
for(j=1;j<=1;j++)
cout<<"*"
cout<<endl;
}
getch();
}
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / ashutosh garg
for(i=1 i<=5; i++){
for(j=1;j<=i;j++){
cout("*");
}//inner-for
cout("\n");
}//outer-for
Is This Answer Correct ? | 5 Yes | 7 No |
Is c++ a high level language?
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h
What's the "software peter principle”?
Is c++ free?
What are the different types of polymorphism?
When should we use container classes instead of arrays?
When are exception objects created?
what is Loop function? What are different types of Loops?
Who invented turbo c++?
Write a program to find the Factorial of a number
How one would use switch in a program?
Is oops and c++ same?