https://www.acmicpc.net/problem/2739
2739번: 구구단
N을 입력받은 뒤, 구구단 N단을 출력하는 프로그램을 작성하시오. 출력 형식에 맞춰서 출력하면 된다.
www.acmicpc.net
더보기
C언어
#include <stdio.h>
int main(){
int N, i;
scanf("%d",&N);
for(i=1; i<10; i++){
printf("%d * %d = %d\n", N, i, N*i);
}
return 0;
}
파이썬
N = int(input())
for i in range(1, 10):
print(N,"*",i,"=",N*i)
'프로그래밍 > 백준' 카테고리의 다른 글
백준 8393번: 합 (C언어) (0) | 2020.01.21 |
---|---|
백준 10950번: A+B - 3 / 15552번: 빠른 A+B (C언어/파이썬) (0) | 2020.01.21 |
백준 10817번: 세 수 (C언어) (0) | 2020.01.11 |
백준 2884번: 알람 시계 (C언어/파이썬) (0) | 2020.01.11 |
백준 2753번: 윤년 (C언어/파이썬) (0) | 2020.01.06 |