Question #13757

how to write this program
Write a program to print this triangle:
**********
*********
********
*******
******
*****
****
***
**
*

Expert's answer


#include "iostream.h"

void main(){
int k=10;
& while (k>=0){
& for (int i=k;i>=0;i--) cout<<"*";
& cout<<"\n";
& k--;
}
}
LATEST TUTORIALS
APPROVED BY CLIENTS