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 |
Which bit wise operator is suitable for turning off a particular bit in a number?
Define pointers?
What is the difference between set and map in c++?
Can user-defined object be declared as static data member of another class?
how to swap two strings without using any third variable ?
Explain abstraction.
What is enum c++?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
Which format specifier is used for printing a pointer value?
given unsigned int ui1=3,ui2=7; what are the outputs of a)ui1 & ui2 b)ui1 && ui2 c)ui1 | ui2 d)ui1 || ui2 i also need the justification for the answers thank you
What are the implicit member functions of class?
Does std endl flush?