Computer Science, asked by medavarapuasritha, 4 months ago

Write an algorithm to find the encrypted
data string
Input
The first line of the input consists of an
integer - key, representing the key value
for the encryption
The second line consists of a string -
dataStr, representing the data string to
be encrypted.
Output
Print a string representing the encrypted
data string
Constraints
0 < len s 1000, len is the length of the
given data string data Str
0 <key < 100​

Answers

Answered by gangireddy30
5

Answer:

Explanation:

#include<stdio.h>

int main()

{

long int s,n,m,ans;

scanf(“%ld %ld %ld”,&s,&n, &m);

ans=pow(s,n);

ans=ans%10;

ans=pow(ans,m);

ans=ans%1000000007;

printf(“%ld”,ans);

return 0;

}

PLEASE MARK ME AS BRAINLIEST

PLEASE MARK ME AS BRAINLIEST

PLEASE MARK ME AS BRAINLIEST

PLEASE MARK ME AS BRAINLIEST

Similar questions