#include<stdio.h>
#include<stdlib.h>
void line()
{
int i,j;
printf("\n");
for(i=1;i<=42;i++)
printf("=");
}
void header()
{
printf("\n");
printf("Built and Designed by Arslan Malik\n\n www.CworldbyAS.blogspot.com");
printf("\n");
}
int main()
{
line();
header();
line();
int value,number,a,sum=0;
printf("\nEnter the number of values : \n");
scanf("%d",&number);
for(a=1;a<=number;a++)
{
printf("Enter Integer : ");
scanf("%d",&value);
sum=sum+value;
}
printf("Sum of %d values is : %d \n\n",number,sum);
return 0;
}
#include<stdlib.h>
void line()
{
int i,j;
printf("\n");
for(i=1;i<=42;i++)
printf("=");
}
void header()
{
printf("\n");
printf("Built and Designed by Arslan Malik\n\n www.CworldbyAS.blogspot.com");
printf("\n");
}
int main()
{
line();
header();
line();
int value,number,a,sum=0;
printf("\nEnter the number of values : \n");
scanf("%d",&number);
for(a=1;a<=number;a++)
{
printf("Enter Integer : ");
scanf("%d",&value);
sum=sum+value;
}
printf("Sum of %d values is : %d \n\n",number,sum);
return 0;
}
No comments:
Post a Comment