fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void) {
  5. int a;
  6.  
  7. do{
  8. scanf("%d", &a);
  9. }while(a<0);
  10.  
  11. printf("aの値 %d\n",a);
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 5320KB
stdin
-7
-3
-1
5
stdout
aの値 5