1: #include<stdio.h>
2: #include<conio.h>
3: void main()
4: {
5: int n,k;
6: clrscr();
7: printf("Enter the int num:\n");
8: scanf("%d",&k);
9: n=k;
10: if(k%2==0)
11: {
12: n=n+1;
13: if(n<20)
14: n=n+1;
15: }
16: printf("Original value of num: %d\n",k);
17: printf("Final value of num: %d",n);
18: getch();
19: }
No comments:
Post a Comment