Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main() {
- int n1, n2, n3;
- float r, c;
- printf("Introduce un numero:\n");
- scanf("%d",&n1);
- printf("Introduce un numero:\n");
- scanf("%d",&n2);
- printf("Introduce un numero:\n");
- scanf("%d",&n3);
- if (n1> n2 && n1>n3){
- if (n2>n3){
- r = n1 % n3; c = trunc(n1/(float)n3);
- printf("%d dividido | entre %d\n \tR:%.0f \tC:%.0f", n1, n3, r, c);
- } else {
- r = n1 % n2; c = trunc(n1/(float)n2);
- printf("%d dividido | entre %d\n \tR:%.0f \tC:%.0f", n1, n2, r, c);
- }
- }else if (n2> n3 && n2>n1){
- if (n1>n3){
- r = n2 % n3; c = trunc(n2/(float)n3);
- printf("%d dividido | entre %d\n \tR:%.0f \tC:%.0f", n2, n3, r, c);
- } else {
- r = n2 % n1; c = trunc(n2/(float)n1);
- printf("%d dividido | entre %d\n \tR:%.0f \tC:%.0f", n2, n1, r, c);
- }
- } else if (n3> n2 && n3>n1){
- if (n1>n2){
- r = n3 % n2; c = trunc(n3/(float)n2);
- printf("%d dividido | entre %d\n \tR:%.0f \tC:%.0f", n3, n2, r, c);
- } else {
- r = n3 % n1; c = trunc(n3/(float)n1);
- printf("%d dividido | entre %d\n \tR:%.0f \tC:%.0f", n3, n1, r, c);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment