Coder

舒心、快乐,比什么都重要

1086 就不告诉你 (15 分)

#include <iostream>
using namespace std;
int arr[100] = {0};
int main(){
    int n, m, sum;
    cin >> n >> m;
    sum = n * m;
    if (sum == 0)
        cout << 0 << endl;
    else{
        int i = 0, flag = 0;
        while (sum != 0){
            arr[i++] = sum % 10;
            sum /= 10;
        }
        for (int t = 0; t < i; t++){
            if (arr[t] != 0)
                flag = 1;
            if (flag == 1)
                cout << arr[t];
        }
    }
    cout << endl;
    return 0;
}

 

posted @ 2019-04-19 00:28  H123K  阅读(129)  评论(0编辑  收藏  举报