Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6816465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:55:45+00:00 2026-05-26T20:55:45+00:00

#include <stdio.h> int main() { int i; int x; int y; for (x =

  • 0
#include <stdio.h>

int main()
{
    int i;
    int x;
    int y;
    for (x = 1; x <= 5; x++)
    {
        for (y = 1; y <= 5; y++)
        {
            i = 7848 + y * (-29412 + y * (23130 + y * (-6660 + y * 630)))
                    + x * (-16668 + y * (56629 + y * (-44066 + y * (12612 + y * -1186))))
                    + x * x * (11910 + y * (-35522 + y * (27183 + y * (-7696 + y * 717))))
                    + x * x * x * (-3420 + y * (9204 + y * (-6844 + y * (1908 + y * -176))))
                    + x * x * x * x * (330 + y * (-826 + y * (597 + y * (-164 + y * 15))));
            printf("%2d ", i/72);
        }
    printf("\n");
    }
}

The output is:

        1  2  3  4  5
        16 17 18 19 6
        15 24 25 20 7
        14 23 22 21 8
        13 12 11 10 9

What mathematic basis is behind this code?

EDIT: I know this code is useless and worthless, and can’t be used in any other way. I am just curious about the mathematical basis behind this code…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:55:46+00:00Added an answer on May 26, 2026 at 8:55 pm

    This looks like someone’s attempt to do something simple in a deliberately complicated way.

    For each cell, it is calculating a polynomial in x and y. The value at each cell is a sum of terms aijxiyj for all 0<=i<=4 and 0<=j<=4.

    To calculate the coefficients aij of the polynomial, you can substitute the values of x and y and the desired result for each cell. You’d get 25 linear equations with 25 variables, which can be solved with basic linear algebra.

    Note that this method has nothing to do with the result being a spiral pattern: It could be used to print any result, the coefficients would just be different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#include <stdio.h> int main() { unsigned long long int num = 285212672; //FYI: fits
#include <stdio.h> int main() { float a = 1234.5f; printf(%d\n, a); return 0; }
#include<stdio.h> int main() { printf(He %c llo,65); } Output: He A llo #include<stdio.h> int
#include <stdio.h> int main() { char read = ' '; while ((read = getchar())
#include<stdio.h> int main() { char a[5]=hello; puts(a); //prints hello } Why does the code
#include<stdio.h> int main() { int a,b; a=a+b; printf(%d,a); return 0; } what should be
#include<stdio.h> void function(int); int main() { int x; printf(Enter x:); scanf(%d, &x); function(x); return
#include<stdio.h> #include<time.h> int main() { clock_t start; double d; long int n,i,j; scanf(%ld,&n); n=100000;
#include<stdio.h> #include<string.h> #include<stdlib.h> int main() { // int char str[40],ch; FILE*fp,*fp1,*fp2; fp=fopen(ide_input,w); fp1=fopen(error_log,w); fp2=fopen(lex_output,w);
consider the code #include<stdio.h> int main(void) { char* a; scanf(%s,a);//&a and &a[0] give same

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.