write a program to print
*
* *
* * *
Answers were Sorted based on User's Feedback
Answer / nash
#include <iostream>
using namespace std;
int main()
{
int i, j, k, m = 10, n;
for (i=0; i<=10; i++){
// Insert one loop to cal culate space to
be kept at start point
for (j=1; j<=m; j++){
cout << " ";
}
for (k=0; k<=i; k++){
cout << " *"; // put here "space
*" so all aligns properly like star
}
cout << '\n';
m--;
}
cin >> n;
return 0;
}
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / shani jaiswal
#include <iostream.h>
int main()
{
int a,b,c,d=5,e=1,f=3;
for(c=1;c<=d;c++)
{
for(a=0;a<f;a++)
cout<<" ";
for(b=0;b<e;b++)
cout<<"* ";
cout<<'\n';
d--;
e++;
f--;
}
return 0;
Is This Answer Correct ? | 0 Yes | 0 No |
What is Inheritance, Multiple Inheritance, Shared and Repeatable Inheritance?
What is the main difference between C++ and Java
What is difference between function overloading and overriding?
WHEN A COPY CONSTER IS CALL ?
what is diff between .net 1.1 and .net 2.0
what is different between oops and c++
What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?
what is difference between String s=new String("vali"); String s="vali"
I am developing a payroll system mini project.I used file concept in program for reading and writing.When the program is reloading into the memory that is if i execute next time the file was cleaned and adding data from the starting this is my problem.I want to strore the previous data and if i want to add any record that should be next of previous data.Please help me.
what is the realstic modeling?
What is stream in oop?
what is the difference between class and structure in C++?