Would you like to react to this message? Create an account in a few clicks or log in to continue.


您沒有登錄。 請登錄註冊

【C語言】九九乘法表 範例

向下  內容 [第1頁(共1頁)]

1【C語言】九九乘法表 範例 Empty 【C語言】九九乘法表 範例 周日 2月 27, 2011 7:54 pm

Williamd

Williamd
Admin

代碼:
/*程式功能:印出九九乘法表*/

 

#include <stdio.h>

int main(){

    int x; /*宣告x*/
    int y; /*宣告y*/
    int z; /*宣告z(積)*/
   
    for(x=1 ; x<=9 ; x++){

                    for(y=1 ; y<=9 ; y++){
                    z = x*y;
                    printf("%d*%d=%d ",y,x,z);
            }

                    printf("\n");
        }
 
  system("PAUSE");   
  return 0;
}

http://c-wind.luntanlong.com

回頂端  內容 [第1頁(共1頁)]

這個論壇的權限:
無法 在這個版面回復文章