วันพฤหัสบดีที่ 18 พฤศจิกายน พ.ศ. 2553

ควบคุมการแสดงผล * ด้วย \n

1.
Coding:

#include
int main (void){

printf("*\n*\n*\n*\n*\n");
system("pause");

}

Output:

*
*
*
*
Press any key to continue . ...

2.
Coding:

#include
int main (void){

printf("*\n**\n***\n****\n*****\n");
system("pause");

}

Output:

*
**
***
****
*****
Press any key to continue . ...

3.
Coding:

#include
int main (void){

printf(" *\n **\n ***\n ****\n*****\n");
system("pause");

}

Output:

*
**
***
****
*****
Press any key to continue . ...

ไม่มีความคิดเห็น:

Popular Posts