Submission #146312


Source Code Expand

#include <iostream>
using namespace std;

int main(void) // main関数(プログラムはここから実行される)
{
	int x, y; // int型の変数の宣言
    
    // ------ 値の入力 ------
    // 空白区切りで2つの数字をint型で入力という意味
	scanf("%dendl", &x);
    scanf("%d", &y);
    //入力例:12+30
    //このときscanf("%d+%d", &x, &y)
    // C++だとこんな命令もある
    // cin >> x >> y;
    
    
    // ----- 結果の出力 ------
    // xとyを足した結果をint型で出力
	printf("%d\n", x - y);
    
    // C++だとこんな命令もある
    // endlは改行の意味
    // cout << x + y << endl;
	return 0;
    //成功しましたという証に0を送る
    
}

Submission Info

Submission Time
Task A - 積雪深差
User purusawa
Language C++ (G++ 4.6.4)
Score 0
Code Size 764 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:10:20: error: ‘scanf’ was not declared in this scope
./Main.cpp:20:22: error: ‘printf’ was not declared in this scope