getprogramcode.com

getprogramcode.com

Share

07/11/2015

long hcf(long, long )
int main ()
{
long x=10, y=5;
long gcd;
gcd=hcf (x, y);
printf ("GCD is : % ld", gcd);
}
long hcf (long a,long b)
{
if (b==0)
return a;
else
return hcf (b, a% b);
}
}
explain how this program execute?

07/11/2015

extern int fun();
int fun();
what is the difference between in it?

02/11/2015

C program for Sum of two number using While LOOP

C program for Sum of two number using While LOOP | Add two numbers using while loop : The two numbers can be added using a while loop also. If you want to know more about the conditional control statement and looping then you should start experimenting rather doing straight things. Two numbers can be added using arithmetic numbers but can also be added without using arithmetic operators. There is also a method to add two numbers using recursion. There is yet another way which is similar to this way but in that you can add two numbers using FOR LOOP. See the code below for sum of numbers using while loop.


int main() {
int i = 10, j = 5;

while (j--)
{
i++; // i adds up the number of times j subtracts and when j becomes 0 condition becomes false and while loop ends
}

printf("Sum is : %d", i); //sum of i +j is stored in i
return (0);
}

Want your business to be the top-listed Computer & Electronics Service in Agra?
Click here to claim your Sponsored Listing.

Telephone

Address


Getprogramcode. Com
Agra
282005