Develop a C program to perform z=x-y where x=x+x2 , y=1+y
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() {
printf("Please enter x ,x2 and y:");
int x,y,x2,z;
scanf("%i%i%i",&x,&x2,&y);
//calculated x and y
x=x+x2;
y=1+y;
z=x-y;
printf("x=%d y=%d z=%d",x,y,z);
return 0;
}
Comments
Leave a comment