#include <stdio.h>
#include <stdlib.h>
void add1(char *p1,int p2){
int i,j;
int a,b,sign;
i=0;
a=p1[i]-'0';
i++;
while(p1[i]!=' '){
a = a*10 +p1[i]-'0';
i++;
}
i++;
if(p1[i] ='+') sign=1;
else if(p1[i] = '-') sign =-1;
else p2 = 0;
i=i+2;
b=p1[i]-'0';
i++;
while(p1[i]!='\0'){
b = b*10 +p1[i]-'0';
i++;
}
p2 = a+(sign*b);
printf("%s %c %d",p1,'=',p2);
}
void main(){
char s1[100];
int s2 = 0;
gets(s1);
int a=3;
add1(s1,s2);
}
#include <stdlib.h>
void add1(char *p1,int p2){
int i,j;
int a,b,sign;
i=0;
a=p1[i]-'0';
i++;
while(p1[i]!=' '){
a = a*10 +p1[i]-'0';
i++;
}
i++;
if(p1[i] ='+') sign=1;
else if(p1[i] = '-') sign =-1;
else p2 = 0;
i=i+2;
b=p1[i]-'0';
i++;
while(p1[i]!='\0'){
b = b*10 +p1[i]-'0';
i++;
}
p2 = a+(sign*b);
printf("%s %c %d",p1,'=',p2);
}
void main(){
char s1[100];
int s2 = 0;
gets(s1);
int a=3;
add1(s1,s2);
}