Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int answer(int x, int y, int z){
- int i, ans=1;
- for(i=0; i<y; i++) ans = (ans*x)%z;
- return ans;
- }
- int main(void){
- int s=263, n=323, box[21], i;
- printf("Input: ");
- for(i=0; i<21; i++) scanf("%d", &box[i]);
- printf("\n");
- for(i=0; i<21; i++) box[i] = answer(box[i], s, n);
- for(i=0; i<21; i++) printf("%c ", box[i]);
- printf("\n(");
- for(i=0; i<21; i++) printf("%d ", box[i]);
- printf(")\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement