Link Exchange
- - - - - - - - - - - - - - ผู้ให้การสนับสนุน- - - - - - - - - - - - - -
จากโจทย์ในเว็บ http://www.sourcecode.in.th/homeworks.php?id=1 ความคิดเห็น #3เป็นการเขียนโปรแกรม เพื่อแสดงผลออกมาให้ตรงกับที่โจทย์กำหนดเงื่อนไข-โจทย์นี้ .cpp เป็น c++-ใช้ for-loop ในการวนรอบเพื่อให้ทำงาน-แสดงผลการทำงานได้ดังนี้1 *21 **321 ***4321 ****54321*****
/* @Author:Mr.Suppakit Thongdee @Website: www.sourcecode.in.th */ #include "stdio.h" #include "conio.h" void main(){ int i; int j; int k; clrscr(); for(i=1; i<=5; i++){ printf("%d",i); for(j=i-1; j>0; j--){ printf("%d",j); } printf(" "); for(k=1;k<=i;k++){ printf("*"); } printf("\n"); } getch(); }
Home - Article - Tutorial - Sourcecode - Dev Handbook - Search - WebBoard - Links - About Us