# Tutor profile: George G.

## Questions

### Subject: Number Theory

what is the remainder when 84^120 is divided by 5 ?

84 mod 5 congruent 4 mod 5 4 mod 5 congruent -1 mod 5 -1^120 congruent 1 mod 5 so 84^120 mod 5 congruent 1 mod 5

### Subject: Discrete Math

Prove that For all integers m, if m is even then 3m + 5 is odd.

m is even that means there is an integer K, such that m = 2 * K 3m + 5 will be 3(2K) +5 = 6K+5 = 6K + 4 + 1 = 2(3K+2) +1 let 3K+2 = q, where q is an integer the equation will be 2q + 1 which is odd

### Subject: C Programming

Write a C programming code that calculates the sum of digits of a number until there is one digit left

/* this program calculates the sum of digits of a number until there is one digit left */ #include <stdio.h> #include <stdlib.h> int sum(int x){ int sum = 0; while(x>0){ sum+=x%10; x/=10; } return sum; } int main() { int num; printf("please enter the number : \n"); scanf("%d",&num); while(num>9) num = sum(num); printf("%d",num); return 0; }

## Contact tutor

needs and george will reply soon.