Hello all,my first post here
/>
I came across this forum and i think its a good place to post some problems i am dealing with as a newbie
/>.
Ok,so these are the programms i want to do:
1. Program that finds the smallest difference penultimate and last digit of 4 numbers you entered from the keyboard;
What is the easiest way to do it
/>? I know how to find last or penultimate digit of a number, but how to include the smallest difference into the program
/>, its confusing me lol There must be an easy way to do it :s
2. Write a program that finds the greatest common divisor two whole numbers a and b;
This sounds easy, i start it as
int a,b,n; (n is divisor i need to find)
printf("write first number");
scanf("%d",&a);
then same for the second one;
printf("enter n");
scanf("%d",&n);
if (a%n==0 & b%n==0) ... (and then idk:P ,this way we will find if a and b divides with n without leftover,but thats not what i need
/>)
Thanks in advance
/>,any help appreciated
/>
"noob"

I came across this forum and i think its a good place to post some problems i am dealing with as a newbie

Ok,so these are the programms i want to do:
1. Program that finds the smallest difference penultimate and last digit of 4 numbers you entered from the keyboard;
What is the easiest way to do it


2. Write a program that finds the greatest common divisor two whole numbers a and b;
This sounds easy, i start it as
int a,b,n; (n is divisor i need to find)
printf("write first number");
scanf("%d",&a);
then same for the second one;
printf("enter n");
scanf("%d",&n);
if (a%n==0 & b%n==0) ... (and then idk:P ,this way we will find if a and b divides with n without leftover,but thats not what i need

Thanks in advance


"noob"