#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i;
int a[4]={1,2,3,4};
int *p1,*p2,*p3;
for(i=0;i<4;i++)
{
p1=&a[0];
p2=&a[2];
p3=*p2-*p1;
printf("\n value of p3%d",p3);
}
getch();
}
Chat with our AI personalities
Add the numbers into one variable as you read them in. But if you prefer, you can read the numbers into an array and then use a loop to add the numbers together.
you ADD all the #s
first add the whole numbers then do simple fraction subtraction
if they are both negative, add like they are positive numbers, but just add the negative sign.
It is the same thing as adding without a yahoo id