What's new

Closed Triangle pattern

Status
Not open for further replies.

Marco2426

Eternal Poster
Joined
Oct 30, 2018
Posts
1,028
Reaction
1,565
Points
508
Hello po. Pwedi po pahelp ano pong code po nito sa c++?
Yung output na lalabas is
1
2 3
Phcorner
4 5 6
7 8 9 10
Phcorner

Kapag nagloop po sya ibibilang nya rin yung string sa loop kunware po nag enter ako ng 6 ang magiging output nya ay six ganyan na ganyan po.
Kasi po yung ginawa ko nag input ako kaso sobra yung loop na ginawa, di nya binibilang yung JOHN.
Sana po matulungan nyo po ako
 
int num, x, y ;
String str = " ";
printf("Enter Number");
scanf num;

For (x=0;x<=num;x++)
{
For (y=0;y<=x;y++)
printf ( y );
}



Sana makatulong boss
 
Status
Not open for further replies.

Similar threads

Back
Top