#include <stdio.h>
#define p printf
#define s scanf
main()
{
int q,num[2000],sum,i,a,b;
float mul,t,grade,quiz,d;
{
p("enter the the total quiz:");
s("%f",&t);
p("enter the no. quiz:");
scanf("%d",&q);
p("enter five no sepeerated by enter :\n");
for(i=0;i<q;i++)
s("%d",&num[i]);
sum=0;
for(i=0;i<q;i++)
sum=sum+num[i];
p("the sum of array :%d",sum);
mul=sum/t;
p("\ntotal:%f",mul);
grade=mul*100;
p("\n total is: %f",grade);
quiz=grade*.4;
p("\nquiz is: %f",quiz);
}
{
p("\n\nENTER THE TOTAL OF ASSIGNMENT");
s("%d",&a);
p("enter the number of assignment");
s("%d",&b);
p("enter the grade of ass");
for(i=0;i<b;i++)
s("%d",&num[i]);
for(i=0;i<b;i++);
d=d+num[i];
p("the sum of assignment is %f:",d);
}
getch();
return 0;
}
gem.gonzales.9 0 Newbie Poster
TrustyTony 888 pyMod Team Colleague Featured Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Vish0203 -6 Junior Poster
mohmadshahbaz 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Vish0203 -6 Junior Poster
I_m_rude commented: it's bad to post wrong info +0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.