[C] 백준 #10430 - 나머지
·
💡 Algorithm/백준
#define _CRT_SECURE_NO_WARNINGS #include int main(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); printf("%d\n", (a + b) % c); printf("%d\n", ((a%c)+(b%c))%c); printf("%d\n", (a*b)%c); printf("%d", ((a%c)*(b%c))%c); return 0; }
[C] 백준 #2588 - 곱셈
·
💡 Algorithm/백준
#define _CRT_SECURE_NO_WARNINGS #include int main(void) { int a, b; scanf("%d %d", &a, &b); printf("%d\n", a * (b % 10)); printf("%d\n", a * ((b / 10) % 10)); printf("%d\n", a * ((b / 100) % 10)); printf("%d", a * b); return 0; }
[JAVA] 백준 #9498 - 시험 성적 출력
·
💡 Algorithm/백준
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int score; score=sc.nextInt(); if ( score >=0 && score = 90) { System.out.println("A"); } else if (score >= 80) { System.out.println("B"); } else if (score >= 70) { System.out.println("C"); } else if (score >= 60) { System.out.println("D"); } else { System.out.println("F"); }..