알고리즘

[알고리즘] 백준 4504 - 배수 찾기

blueberrysoda 2024. 7. 20. 23:59
#include <iostream>
using namespace std;

int main(){
    int N;
    cin >> N;
 
    while(true){
        int inp;
        cin >> inp;
 
        if(inp==0){
            break;
        }
 
        if(inp%N==0){
            cout << inp << " is a multiple of " << N << ".\n";
        }
        else cout << inp << " is NOT a multiple of " << N << ".\n";
 
    }
    return 0;
}