🔒 Closed Triangle pattern

Status
Not open for further replies.

Marco2426

Established
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.

About this Thread

  • 4
    Replies
  • 496
    Views
  • 2
    Participants
Last reply from:
Marco2426

Trending Topics

Online now

Members online
693
Guests online
3,396
Total visitors
4,089

Forum statistics

Threads
2,306,516
Posts
29,172,272
Members
1,194,892
Latest member
ALMATRX
Back
Top