fork download
  1. #include <stdio.h>//第0講演習 01-6
  2.  
  3. void printsum(){
  4. int i, sum=0;
  5. for(i=1;i<=10;i++){
  6. sum=sum+i;
  7. }
  8. printf("%d\n",sum);
  9. }
  10. int main() {
  11. printsum();
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
55