Friday, March 17, 2023

"sum of the 1^4+2^4+3^4+...+n^4 using c " by c

 //sum of the 1^4+2^4+3^4+...+n^4 using c

#include <stdio.h>
int main (){
    int i,n,power4;
    printf ("enter the value of n :");
    scanf ("%i",&n);
    for (i=1;i<=n;i++){
        power4=power4 + i*i*i*i;
    }
    printf ("the sum of 1st power4 upto n is : %i",power4);
    return 0;
}

No comments:

Post a Comment

print a multiplication table of any integer taking from user

 // print a multiplication table of any integer taking from user  #include "stdio.h" int main () { int n,mul,i; printf ("...