Submission #1517240


Source Code Expand

#include <stdio.h>
int main(void)
{
  int a, b;
  /* 2つ整数を入力 */
  printf("1つ目の整数: a = ");
  scanf("%d", &a);
  printf("2つ目の整数: b = ");
  scanf("%d", &b);
  /* 引き算の計算・出力 */
  printf("a - b = %d\n", a-b);
  return 0;

Submission Info

Submission Time
Task A - アルバム
User nakajima0510
Language C++14 (GCC 5.4.1)
Score 0
Code Size 275 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:12:11: error: expected ‘}’ at end of input
   return 0;
           ^
./Main.cpp:7:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &a);
                  ^
./Main.cpp:9:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &b);
                  ^