์ƒˆ์†Œ์‹

๐Ÿงฎ PS

์ฝ”๋“œ์—… (Code up) 1038~1046 (์‚ฐ์ˆ ์—ฐ์‚ฐ) [ C++, CPP ]

  • -

๋ฌธ์ œ๋งํฌ : https://codeup.kr/problemsetsol.php?psid=23

 

๋ฌธ์ œ์ง‘ / ๊ธฐ์ดˆ 100์ œ

 

codeup.kr

 

 

 

*1038๋ฒˆ

#include <iostream>
using namespace std;
int main(){
    long long a, b;
    cin >> a >> b;
    cout << a+b;
}

 

 

*1039๋ฒˆ

#include <iostream>
using namespace std;
int main(){
    long long a, b;
    cin >> a >> b;
    cout << a+b;
}

 

 

*1040๋ฒˆ

 

#include <iostream>
using namespace std;
int main(){
    long long a;
    cin >> a ;
    cout << -a;
}

 

*1041๋ฒˆ

#include <iostream>
using namespace std;
int main(){
    int a;
    scanf("%c",&a);
    printf("%c",a+1);
}

 

 

*1042๋ฒˆ

 

#include <iostream>
using namespace std;
int main(){
    int a, b;
    scanf("%d %d",&a, &b);
    printf("%d",a/b);
}

 

*1043๋ฒˆ

 

#include <iostream>
using namespace std;
int main(){
    int a, b;
    scanf("%d %d",&a, &b);
    printf("%d",a%b);
}

 

 

*1044๋ฒˆ

#include <iostream>
using namespace std;
int main(){
    long long a;
    cin >> a;
    cout << a+1;
}

 

 

*1045๋ฒˆ

#include <iostream>
using namespace std;
int main(){
    int a, b;
    cin >> a>>b;
    cout << a+b << endl << a-b << endl << a*b << endl << a/b <<endl << a%b<< endl;
    float a2 = a, b2 = b;
    printf("%.2f", a2/b2);
}

 

 

*1046๋ฒˆ

#include <iostream>
using namespace std;
int main(){
    float a, b, c;
    cin >> a >> b >> c ;
    cout << a + b + c << endl ;
    printf("%.1f",(a+b+c)/3.0);
}
Contents

ํฌ์ŠคํŒ… ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค

์ด ๊ธ€์ด ๋„์›€์ด ๋˜์—ˆ๋‹ค๋ฉด ๊ณต๊ฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.