# include <stdio.h>
# include <conio.h>
main()
{ int number;
clrscr();
printf("enter the value for n
");
scnaf("%d",&number);
/* MY FIRST LOGIC*/
printf("%d",(number-1)%9+1);
/* MY SECOND LOGIC*/
printf("%d",9-((18-number%9)/9 * 9));
/* MY THIRD LOGIC */
printf("%d",n%9+(9-n%9)/9 * 9);
getch();
}
# include <conio.h>
main()
{ int number;
clrscr();
printf("enter the value for n
");
scnaf("%d",&number);
/* MY FIRST LOGIC*/
printf("%d",(number-1)%9+1);
/* MY SECOND LOGIC*/
printf("%d",9-((18-number%9)/9 * 9));
/* MY THIRD LOGIC */
printf("%d",n%9+(9-n%9)/9 * 9);
getch();
}
No comments:
Post a Comment