Thursday, June 6, 2019

Write a program to that returns the - sum of squares of all odd numbers from 1 to 25


/* ***********************************************
    Write a program to that returns the - sum of squares of all odd numbers from 1 to 25

 date:06-06-2019
 created by:ANIL DURGAM

*****************************************************/

#include <stdio.h>
#include <stdlib.h>


 int func(void);

 void main()
{
    printf("%d\n",func());
}
int func(void)
{
    int num, s=0;
    for(num=1;num<=25;num++)
    {
        if (num%2!=0)
             s+=num*num;
    }
    return s;
}

output:::


Note:

please send the questions which you are facing problem in C Language.

also write interview questions which are you faced in during interview related to C Language.

so i can try to solve them and send you back.

No comments:

Post a Comment

python class topic video