基础实验3-2.1 一元多项式求导 (20分)

我写的没啥技术含量

#include <iostream>

int main() {
    using namespace std;
    int a,b;
    while(cin>>a>>b){
        if(b!=0&&b!=1){
            cout<<a*b<<" "<<b-1<<" ";
            }
        else if(b==1){
            cout<<a<<" ";
        }else if(b==0){
            cout<<0;
        }
    }
    cout<<endl;
    return 0;
}

发布了54 篇原创文章 · 获赞 0 · 访问量 972

猜你喜欢

转载自blog.csdn.net/hellobettershero/article/details/104323576
今日推荐