benjama409   11-12-2013, 10:16 AM
#1
***********
**********
*********
********
*******
******
*****
****
***
**
*
ใช้คำสั่ง for ซ้อนในการวนลูปแต่ผมทำแบบนี้ไม่ได้อะ มันต้องกลับข้างยังไงเหรอครับช่วยบอกที
XD
gol-a-khung   11-12-2013, 11:14 AM
#2
for(i=1;i<=10;i++){
for(j=10;j>=i;j--){
คำสั่งโชว์;
}
คำสั่งขึ้นบรรทัดใหม่;
}
dreamknight   11-12-2013, 11:21 AM
#3
ตามนี้เลยขอรับ = v =

#include <stdio.h>
#include <string.h>

main()
{
int i;
for(i=1; i<=11; i++){

int j;
for(j=11; j>=i; j--)
{
printf ("*");
}

printf ("\n");
}
}

May the flames guide your way. Every ending will make you stronger.

TheMoo2000   11-12-2013, 11:59 PM
#4
[shcode=cpp]
#include <stdio.h>

int main(){
int i,j;
for(i=11;i>=0;i--){
for(j=i;j>0;j--){
printf("*");
}
printf("\n");
}
return 0;
}
[/shcode]
  
Users browsing this thread: 1 Guest(s)
Powered By MyBB, © 2002-2024 MyBB Group.
Made with by Curves UI.