백준 알고리즘(C/C++) - 2739번 구구단

#include <stdio.h>

int main(void) {
	int a;
	scanf("%d", &a);
	for (int i = 1; i < 10; i++)
		printf("%d * %d = %d\n", a, i, a * i);
	return 0;
}
#include <iostream>

int main() {
	int a;
	std::cin >> a;
	for (int i = 1; i < 10; i++)
		std::cout << a << " * " << i << " = " << a * i << std::endl;
	return 0;
}

 

댓글

Designed by JB FACTORY