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 |
Explain what are accessor methods?
What is c++ flowchart?
What is a virtual destructor? Explain the use of it?
What is c++ redistributable?
Where is atoi defined?
List out some of the object-oriented methodologies?
Implement a 2 dimensional array by one dimentional array
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
Why do we need constructors in c++?
Describe the advantages of operator overloading?
What is lambda expression c++?
What are the four main data types?