首页 > 其他 > 详细

未完成

时间:2019-10-29 13:25:05      阅读:70      评论:0      收藏:0      [点我收藏+]
#include<stdio.h>
typedef    struct Fushu
{   int shibu;
    int xubu;
    struct Fushu *next;
}Fushu,*Linklist;



Fushu *insert(Fushu *fushu,int a,int b){
    Fushu *current;
    current=fushu;
    current->shibu=a;
    current->xubu=b;
    current=current->next;
    return current;
}

 int add(Fushu *a,Fushu *b){
    printf("%d+%di",a->shibu+b->shibu,a->xubu+b->xubu);
    return 0;
    }

int minus(Fushu *a,Fushu *b){
    printf("%d+%di",a->shibu-b->shibu,a->xubu-b->xubu);
    return 0;
    }

int multiply(Fushu *a,Fushu *b){
    printf("%d+%di",a->shibu*b->shibu-a->xubu*b->xubu,a->shibu*b->xubu+a->xubu*b->shibu);
    return 0;
    }

int shi(Fushu *a){
    return a->shibu;
}

int xu(Fushu *a){
    return a->xubu;
}

int main(int argc, char const *argv[])
{
    int xuhao,x,y,z;
    printf("你想进行什么操作?(输入序号)\n1.输入复数\n2.复数求和\n3.复数求差\n4.复数求积\n5.输出实部\n6.输出虚部\n");
    scanf("%d",&xuhao);
    if(xuhao==1){
        printf("请输入实部和虚部(x.y)\n");
        scanf("%d.%d",&x,&y);

    }


    return 0;
}

 

未完成

原文:https://www.cnblogs.com/p201821440024/p/11757649.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!