Distress! Please C language master!

Updated on technology 2024-05-29
8 answers
  1. Anonymous users2024-02-11

    #include

    main()

    long i;

    for(i=1;(i*i*i*i*i*i)<999999;i++)if((i*i*i*i*i*i)>=100000)printf("%ld",(i*i*i*i*i*i));

    return 0;

    A number z, which is the square of x, is the cube of y, finds such a number.

    y/x=y=n*n;

    x=n*n*n;

    So z=y*y*y=x*x=n*n*n*n*n*n*n;

    This is also a nonsense, expecting the master to give an algorithm.

  2. Anonymous users2024-02-10

    It should overflow with an int type.

    At least for a long time, I think it's ......

  3. Anonymous users2024-02-09

    #include

    main()

    long i,j,k;

    for(i=100000;i<1000000;i++)for(j=1;j<=sqrt(i);j++)if (j*j==i){

    for(k=1;kprintf("The numbers that meet the conditions are: %d, which is the square of %d, is the cube of %d; ",i,j,k);

    Running result: The numbers that meet the conditions are: 117649, which is 343 square, is 49 cubic;

    The numbers that meet the conditions are: 262144, which is 512 squared, is 64 cubic;

    The numbers that meet the conditions are: 531441, which is 729 squared, is 81 cubic;

  4. Anonymous users2024-02-08

    Why does this need to be discussed?

  5. Anonymous users2024-02-07

    "!" in c" is a non-operation in a logical operation.

    It is a non-operator in C, and when used in front of a variable, a non-arithmetic expression is constructed, and the result of the expression is a boolean value (i.e., only true or false). When using a variable, if the variable is not a Boolean data type, it will be forcibly converted to a Boolean type and then used, for example, the integer variable 123 will be converted to true, and the integer variable 0 will be converted to false.

  6. Anonymous users2024-02-06

    put sum=sum+x; After moving to }, x=1; Former.

    It's too complicated to write, as follows.

    That's it. Genus – int main(void).

  7. Anonymous users2024-02-05

    Classic examples of the C language are 1+2!+3!+.20!of and.

  8. Anonymous users2024-02-04

    After reading your program, you also circled me.

    I dizzy. 1. According to your idea, from 1 to n, create a loop (cyclic variable t), and then create an inner loop (cyclic variable i), which is used to calculate the factorial of t, and then add it up (variable sum), and you're good to go.

    The idea is relatively clear, but there are a few mistakes:

    1. A[100] is here to make trouble, right? Remove! By the way, replace a[t]=t with x=1,i2、sum=sum+x are misplaced.,How much do you want to add.。 Move it to x=1 and replace x=1 by the way, there is already one in front of it.

    That might be the case. The procedure is:

    main()

    printf(“%d”,sum);

    Second, its practical cycle can solve the problem and greatly simplify the procedure:

    main()

    printf(“%d”,sum);}

Related questions
6 answers2024-05-29

1. Who or whom did with

2、no money house >>>More

6 answers2024-05-29

#include

void main() >>>More

6 answers2024-05-29

The most important thing to learn programming is to practice more and write by yourself. No matter how many books you read, it's useless not to do it yourself. When you encounter a problem, it's best to try to solve it yourself, flip through the information or something, and then ask others if you really can't solve it, so that you can improve. >>>More

11 answers2024-05-29

I feel very simple...

#include >>>More