您的位置:首页 > 其它

Problem B: 小数计算——结构体

2016-03-20 23:34 197 查看


#include <stdio.h>
#include <stdlib.h>
struct xiaoshu
{
int head,tail;
char point;
};
void add(struct xiaoshu a,struct xiaoshu b)
{
printf("%d.%d",a.head+b.head,a.tail+b.tail);
}
int main()
{
struct xiaoshu a,b;
void add(struct xiaoshu,struct xiaoshu);
scanf("%d%c%d",&a.head,&a.point,&a.tail);
scanf("%d%c%d",&b.head,&b.point,&b.tail);
add(a,b);
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: