Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- char ch1,ch2;
- int sum;
- while(1)
- {
- scanf("%c%c",&ch1,&ch2);
- if(ch1=='?' && ch2=='?')
- break;
- sum=((ch1-65)+(ch2-65));
- if(sum>25)
- {
- sum=sum%26;
- }
- printf("%c\n",sum+65);
- getchar();
- }
- return 0;
- }
- #include<stdio.h>
- int main()
- {
- char ch1,ch2;
- int sum;
- while(1)
- {
- scanf("%c%c",&ch1,&ch2);
- if(ch1=='?' && ch2=='?')
- break;
- sum=((ch1-65)+(ch2-65));
- if(sum>25)
- {
- sum=sum%26;
- }
- printf("%c\n",sum+65);
- getchar();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement