CODING:
#include<stdio.h>
#include<conio.h>
void main()
{
int num1,num2,sub,*p1,*p2;
clrscr();
printf("Enter 1st number: ");
scanf("%d",&num1);
printf("Enter 2nd number: ");
scanf("%d",&num2);
p1=&num1;
p2=&num2;
sub=*p1-*p2;
printf("\n\nDifference of %d and %d is %d",*p1,*p2,sub);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int num1,num2,sub,*p1,*p2;
clrscr();
printf("Enter 1st number: ");
scanf("%d",&num1);
printf("Enter 2nd number: ");
scanf("%d",&num2);
p1=&num1;
p2=&num2;
sub=*p1-*p2;
printf("\n\nDifference of %d and %d is %d",*p1,*p2,sub);
getch();
}
CODING |
OUTPUT |
For any query or suggestion please comment below...
Nice sir keep it up and post such example with proper output and program
ReplyDelete