fork download
  1. #include <stdio.h>
  2.  
  3.  
  4. int main(void) {
  5. int a = 30;//宣言するところ
  6. int b = 7;//intは整数の宣言です
  7. int c,d,e,f,g;//宣言するところ
  8. c = a + b;//足し算
  9. d = a - b;//引き算
  10. e = a * b;//掛け算
  11. f = a / b;//割り算
  12. g = a % b;//あまり
  13. printf("%d\n",c);//結果を出力
  14. printf("%d\n",d);
  15. printf("%d\n",e);
  16. printf("%d\n",f);
  17. printf("%d\n",g);
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
37
23
210
4
2