c Programming

C programmes

Posted on

Write a Program to Calculate the Net Salary. Write a Program to Swap Values of Two Variables Without using 3rd Variable. Write a Program to Swap Values of Two Variables using Third Variable. Write a Program to Convert Time in Seconds to Hours, Minutes and Seconds. Write a Program to Convert Temperature from Degree Centigrade […]

c Programming

Write a Program to Swap Values of Two Variables using Third Variable

Posted on

/*Program to Swap Values of Two Variables using Third Variable*/ #include <stdio.h> main() { int a, b, temp; printf(“\nEnter any two numbers: “); scanf(“%d %d”, &a, &b); printf(“\n\nBefore Swapping:\n”); printf(“\na = %d\n”, a); printf(“\nb = %d\n”, b); temp = a; a = b; b = temp; printf(“\n\nAfter Swapping:\n”); printf(“\na = %d\n”, a); printf(“\nb = %d\n”, […]