対角線出力(出力フォーマット制御)

 

する#include <stdio.hの> INTメイン(ボイド
{ int型のI。
    int型のx;        / * 瑕佹樉绀虹殑琛屾暟* / 
    printfの(" Hello Worldの" ); 
    scanf関数(" %のD "、&x)は、(i = 1 ; iは= xを<; Iは++ 
        のprintf(" %※Dを\ n "、I、I%10 )。リターン0 ; 
}


    


    

     

輸出

ハローworld6
 1 
 2 
  3 
   4 
    5 
     6

 

おすすめ

転載: www.cnblogs.com/sea-stream/p/11037612.html