Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<iostream>
- #include<string.h>
- using namespace std;
- int main()
- {
- int i,j;
- char str[100];
- char str1[100];
- while(gets(str) && strcmp(str,"#")!=0)
- {
- int l=strlen(str);
- // int m=1;
- int j=0;
- for(i=1;i<l;i++)
- {
- str1[j]=((str[i]-'A')+1)*i;
- //str1[j]=str[i]*i;
- //m++;
- j++;
- }
- printf("%s\n",str1);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement