what should be the code for the following output? * ** *** **** ***** ****** uptil n | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
- 1

what should be the code for the following output? * ** *** **** ***** ****** uptil n

25th Sep 2016, 5:39 AM
bittu
bittu - avatar
2 Réponses
+ 1
int main { int i, j, n; cin>>n; //for number of row for( i=0; i< n; i++) { for( j=0; j<=i ; j++) {cout<<"*";} } }
25th Sep 2016, 7:50 AM
ANKUSH CHAUHAN
ANKUSH CHAUHAN - avatar
0
add cout<<endl; in outerloop
25th Sep 2016, 11:57 AM
ANKUSH CHAUHAN
ANKUSH CHAUHAN - avatar