Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<conio.h>
- #include<stdio.h>
- void main()
- {
- clrscr();
- char ch[6] = {'s','a','m','p','l','e'};
- int a[6];
- int c=5;
- printf("Entered String Is ::");
- for(int i=0;i<=6;i++)
- printf("%c",ch[i]);
- for(i=0;i<6;i++)
- {
- a[i] = ((int)ch[i])+c;
- c--;
- }
- printf("\nEncrypted String is::");
- for(int j=0;j<6;j++)
- {
- printf("%c",a[j]);
- }
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment