Head Constable (Ministerial)
Apply Now
All India Govt Job Update
NFSU Professor, Asst Professor – 194 Posts
Click Here Notification/Website
RPSC : वरिष्ठ अध्यापक (माध्यमिक शिक्षा) की आवेदन की अंतिम तिथि 14.05.2022 तक बढ़ाए जाने के संबंध में👇
#include<stdio.h>
int main()
{
printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
int n, i;
float sum = 0, x;
printf("Enter number of elements: ");
scanf("%d", &n);
printf("\n\n\nEnter %d elements\n\n", n);
for(i = 0; i < n; i++)
{
scanf("%f", &x);
sum += x;
}
printf("\n\n\nAverage of the entered numbers is = %f", (sum/n));
printf("\n\n\n\n\t\t\tCoding is Fun !\n\n\n");
return 0;
}
#include<stdio.h>
#include<math.h>
int main()
{
printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
int n,sum,i,t,a;
printf("\n\n\nThe Armstrong numbers in between 1 to 500 are : \n\n\n");
for(i = 1; i <= 500; i++)
{
t = i; // as we need to retain the original number
sum = 0;
while(t != 0)
{
a = t%10;
sum += a*a*a;
t = t/10;
}
if(sum == i)
printf("\n\t\t\t%d", i);
}
printf("\n\n\n\n\t\t\tCoding is Fun !\n\n\n");
return 0;
}
Head Constable (Ministerial) Apply Now Notification