fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int no;
  6.  
  7. printf("正の整数を入力してください:");
  8. scanf("%d",&no);
  9.  
  10. while(no>=0){
  11. printf("%d",no);
  12. no--;
  13. }
  14. if(no>=0)
  15. printf("\n");
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 9424KB
stdin
-2
stdout
正の整数を入力してください: