2017/3/18

10929 - You can say 11

#include<iostream>
using namespace std;
int main(){
    int n = 0;
    while(cin>>n && n!=0){
        if(n%11 == 0){
            cout<<n<<" is a multiple of 11.";
        }
        else{
            cout<<n<<" is not a multiple of 11.";
        }
    }
    return 0;
}
題目網址:http://bit.ly/2nyjwYG

沒有留言:

張貼留言