글
백준 2739번 구구단(JAVA, C#)
백준 프로그래밍
2023. 2. 14. 13:44
728x90
SMALL
자바
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int mul = 0;
for(int i = 1;i<=9;i++)
{
mul = a*i;
System.out.println(a + " * " + i + " = " + mul);
}
}
}
///////////////////////
C#
using System;
namespace Baekjoon {
class Program {
static void Main(string[] args) {
string s = Console.ReadLine();
int a = int.Parse(s);
for(int i = 1;i<=9;i++)
{
int mul = a*i;
Console.WriteLine(a + " * " + i + " = " + mul);
}
}
}
}
728x90
'백준 프로그래밍' 카테고리의 다른 글
백준 8393번 합(JAVA, C#) (0) | 2023.02.14 |
---|---|
백준 10950번 A+B-3(JAVA, C#) (0) | 2023.02.14 |
백준 2480번 주사위 세 개(JAVA, C#) (0) | 2023.02.14 |
백준 2525번 오븐 시계(JAVA, C#) (0) | 2023.02.12 |
백준 2884번 알람 시계(JAVA, C#) (0) | 2023.02.12 |