728x90

# 2588๋ฒˆ - ๊ณฑ์…ˆ

๋ฌธ์ œ

(์„ธ ์ž๋ฆฌ ์ˆ˜) × (์„ธ ์ž๋ฆฌ ์ˆ˜)๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ณผ์ •์„ ํ†ตํ•˜์—ฌ ์ด๋ฃจ์–ด์ง„๋‹ค.

(1)๊ณผ (2)์œ„์น˜์— ๋“ค์–ด๊ฐˆ ์„ธ ์ž๋ฆฌ ์ž์—ฐ์ˆ˜๊ฐ€ ์ฃผ์–ด์งˆ ๋•Œ (3), (4), (5), (6)์œ„์น˜์— ๋“ค์–ด๊ฐˆ ๊ฐ’์„ ๊ตฌํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค.

 

์ž…๋ ฅ

์ฒซ์งธ ์ค„์— (1)์˜ ์œ„์น˜์— ๋“ค์–ด๊ฐˆ ์„ธ ์ž๋ฆฌ ์ž์—ฐ์ˆ˜๊ฐ€, ๋‘˜์งธ ์ค„์— (2)์˜ ์œ„์น˜์— ๋“ค์–ด๊ฐˆ ์„ธ์ž๋ฆฌ ์ž์—ฐ์ˆ˜๊ฐ€ ์ฃผ์–ด์ง„๋‹ค.

 

์ถœ๋ ฅ

์ฒซ์งธ ์ค„๋ถ€ํ„ฐ ๋„ท์งธ ์ค„๊นŒ์ง€ ์ฐจ๋ก€๋Œ€๋กœ (3), (4), (5), (6)์— ๋“ค์–ด๊ฐˆ ๊ฐ’์„ ์ถœ๋ ฅํ•œ๋‹ค.


๋ฌธ์ œํ’€์ด

#include <stdio.h>
int main(void)
{
    int num1,num2;
    
    scanf("%d %d", &num1,&num2);
    printf("%d\n", num1*((num2%100)%10) );
    printf("%d\n", num1*((num2%100)/10) );
    printf("%d\n", num1*(num2/100) );
    printf("%d", num1*num2 );
}

 

num2%100 → 85%10 → 5
num2%100 → 85/10 → 8
num2/100 → 3

 

+ Recent posts