Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int n, a, b, c, d, e, sum, count, i ,j, holder;
- scanf("%d", &n);
- for(i=1; i<=n; i++){
- scanf("%d %d %d", &a, &b, &c);
- holder = b;
- for(j=0; j<c; j++){
- holder++;
- }
- if(holder>a){
- holder = holder % a;
- printf("%d\n", holder);
- }
- else{
- printf("%d\n", holder);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement