- Program :
#include <stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\n----------------INCREMENT AND DECREMENT OPERATORS----------------");
printf("\nEnter any two values:");
scanf("%d%d",&a,&b);
printf("\n----------------INCREMENT OPERATOR(++)----------------");
printf("\n Increment is : %d",++a);
printf("\n----------------DECREMENT OPERATOR(--)----------------");
printf("\n Decrement is : %d",--b);
getch();
}
void main()
{
int a,b;
clrscr();
printf("\n----------------INCREMENT AND DECREMENT OPERATORS----------------");
printf("\nEnter any two values:");
scanf("%d%d",&a,&b);
printf("\n----------------INCREMENT OPERATOR(++)----------------");
printf("\n Increment is : %d",++a);
printf("\n----------------DECREMENT OPERATOR(--)----------------");
printf("\n Decrement is : %d",--b);
getch();
}
- Output :
No comments:
Post a Comment