Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to print
*
* *
* * *

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is encapsulation and abstraction? How are they implemented in C++?

1077


Write a program to reverse a string using recursive function?

2290


Get me a number puzzle game-program

2200


What is coupling in oops?

1076


What is and I oop mean?

1124


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

2027


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

2086


Is html an oop?

1010


What is coupling in oop?

978


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4686


Why is polymorphism important in oop?

1019


What does and I oop and sksksk mean?

1113


What is overriding in oop?

1002


i got a backdoor offer in process global,Bangalore..Can i work with it?

2802


What is the real life example of polymorphism?

1119