1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【ABC050 】AtCoder APG4b Addition and Subtraction Easy

Posted at

ABC050 APG4b Addition and Subtraction Easy

#include<bits/stdc++.h>
using namespace std;

int main(){
  int a,b,ans=0;
  char x;
  cin >> a >> x >> b;
  if(x=='+'){
    ans = a+b;
  }else if(x=='-'){
    ans = a-b;
  }else{
    cout << "Operator error" << endl;
  }
  
  cout << ans << endl;
}

一般的にEasyなこの問題も私は躓きました(笑)とりあえずAtCoder練習し始めて4日目!!3日坊主は乗り越えた!

1
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?