Skip to main content
Add language tag for syntax highlighting
Source Link
Paul R
  • 2.9k
  • 1
  • 18
  • 22
#include<stdio.h>
int main(void){int a,b,c,d;for(a=1;a<=711/4;++a)for(b=a;b<=711/4;++b)for(c=b;c<=711/4;++c){d=711-(a+b+c);if(d<c)break;if(a*b*c*d==711000000)printf("a=%.2f,b=%.2f,c=%.2f,d=%.2f\n",a/100.,b/100.,c/100.,d/100.);}}
#include<stdio.h>
int main(void){int a,b,c,d;for(a=1;a<=711/4;++a)for(b=a;b<=711/4;++b)for(c=b;c<=711/4;++c){d=711-(a+b+c);if(d<c)break;if(a*b*c*d==711000000)printf("a=%.2f,b=%.2f,c=%.2f,d=%.2f\n",a/100.,b/100.,c/100.,d/100.);}}
#include <stdio.h>

int main()
{
    int a, b, c, d;

    for (a = 1; a <= 711 / 4; ++a)
        for (b = a; b <= 711 / 4; ++b)
            for (c = b; c <= 711 / 4; ++c)
            {
                d = 711 - (a + b + c);
                if (d < c) break;
                if (a * b * c * d == 711000000)
                    printf("a = %.2f, b = %.2f, c = %.2f, d = %.2f\n", a / 100., b / 100., c / 100., d / 100.);
            }
}
#include <stdio.h>

int main()
{
    int a, b, c, d;

    for (a = 1; a <= 711 / 4; ++a)
        for (b = a; b <= 711 / 4; ++b)
            for (c = b; c <= 711 / 4; ++c)
            {
                d = 711 - (a + b + c);
                if (d < c) break;
                if (a * b * c * d == 711000000)
                    printf("a = %.2f, b = %.2f, c = %.2f, d = %.2f\n", a / 100., b / 100., c / 100., d / 100.);
            }
}
#include<stdio.h>
int main(void){int a,b,c,d;for(a=1;a<=711/4;++a)for(b=a;b<=711/4;++b)for(c=b;c<=711/4;++c){d=711-(a+b+c);if(d<c)break;if(a*b*c*d==711000000)printf("a=%.2f,b=%.2f,c=%.2f,d=%.2f\n",a/100.,b/100.,c/100.,d/100.);}}
#include <stdio.h>

int main()
{
    int a, b, c, d;

    for (a = 1; a <= 711 / 4; ++a)
        for (b = a; b <= 711 / 4; ++b)
            for (c = b; c <= 711 / 4; ++c)
            {
                d = 711 - (a + b + c);
                if (d < c) break;
                if (a * b * c * d == 711000000)
                    printf("a = %.2f, b = %.2f, c = %.2f, d = %.2f\n", a / 100., b / 100., c / 100., d / 100.);
            }
}
#include<stdio.h>
int main(void){int a,b,c,d;for(a=1;a<=711/4;++a)for(b=a;b<=711/4;++b)for(c=b;c<=711/4;++c){d=711-(a+b+c);if(d<c)break;if(a*b*c*d==711000000)printf("a=%.2f,b=%.2f,c=%.2f,d=%.2f\n",a/100.,b/100.,c/100.,d/100.);}}
#include <stdio.h>

int main()
{
    int a, b, c, d;

    for (a = 1; a <= 711 / 4; ++a)
        for (b = a; b <= 711 / 4; ++b)
            for (c = b; c <= 711 / 4; ++c)
            {
                d = 711 - (a + b + c);
                if (d < c) break;
                if (a * b * c * d == 711000000)
                    printf("a = %.2f, b = %.2f, c = %.2f, d = %.2f\n", a / 100., b / 100., c / 100., d / 100.);
            }
}
Source Link
Paul R
  • 2.9k
  • 1
  • 18
  • 22

C (229 characters)

Sacrificial offering:

#include<stdio.h>
int main(void){int a,b,c,d;for(a=1;a<=711/4;++a)for(b=a;b<=711/4;++b)for(c=b;c<=711/4;++c){d=711-(a+b+c);if(d<c)break;if(a*b*c*d==711000000)printf("a=%.2f,b=%.2f,c=%.2f,d=%.2f\n",a/100.,b/100.,c/100.,d/100.);}}

Re-formatted for readability:

#include <stdio.h>

int main()
{
    int a, b, c, d;

    for (a = 1; a <= 711 / 4; ++a)
        for (b = a; b <= 711 / 4; ++b)
            for (c = b; c <= 711 / 4; ++c)
            {
                d = 711 - (a + b + c);
                if (d < c) break;
                if (a * b * c * d == 711000000)
                    printf("a = %.2f, b = %.2f, c = %.2f, d = %.2f\n", a / 100., b / 100., c / 100., d / 100.);
            }
}