C Program to swap two numbers without third variable
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- int a, b;
- clrscr();
- printf(" enter the two number for swapping");
- scanf("%d%d",&a,%b);
- a=a+b;
- b=a-b;
- a=a-b;
- printf("\nAfter swap a=%d b=%d",a,b);
- getch();
- }
Write a program even or odd in array
ReplyDelete