Submission #1517239


Source Code Expand

#include <stdio.h>
int main(void)
{
  int a, b;
  (a,b)
  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 218 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:6:3: error: expected ‘;’ before ‘printf’
   printf("1つ目の整数: a = ");
   ^
./Main.cpp:11: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);
                  ^