# Need Urgent Help!

Hello,
New to this forum and the world of programming, first year student pursuing my Bsc, just got into structured programming and I'm in a bit of trouble, the first assignment requires us to write a program that accepts 6 inputs, display them from lowest to highest, calculate the avg scores and determine the perfomance of the students (Excellent, Poor, etc). To be quite honest I'm a bit hung up on how to begin, I am not asking for someone to do my homework, but any assistance will be greatly appreciated.

• //Program name : test086.c
//WAP to calculate and print Mark Sheet
# include
# include
void main()
{
int m1,m2,m3,m4,m5,m6,totalmark;
float perc;
char status;
clrscr();
printf("Enter SIX Subject Marks Separated by Space : ");
scanf("%d %d %d %d %d %d",&m1,&m2,&m3,&m4,&m5,&m6);

totalmark=m1+m2+m3+m4+m5+m6;
perc=totalmark/6;
printf("Total Mark = %d Percantage = %f
",totalmark,perc);

if (m1>=35 && m2>=35 && m3>=35 && m4>=35 && m5>=35 && m6>=35)
{
status='p';
printf("Status = Pass
");
if (perc>=75)
printf("Dist");
if (perc>=60 && perc<75)
printf("First class");
if (perc>=45 && perc<60)
printf("Second Class");
if (perc<45)
printf("Pass Class");
}
else
{
status='f';
printf("Status = Fail
");
}
getch();
}

[b]Output:[/b]
Enter SIX Subject Marks Separated by Spaces : 60 70 80 90 80 70
Total Marks = 450 Percantage = 75.000000
Status = Pass

Enter SIX Subject Marks Separated by Spaces : 50 40 30 60 50 30
Total Marks = 260 Percantage = 43.000000
Status = Fail

It offers online Let Me Try Compiler for C, C++, C#, JAVA, CSS, HTML, JavaScript.
http://www.cbtsam.com/cl1/cbtsam-cl1-080.php

• //Program name : test086.c
//WAP to calculate and print Mark Sheet
# include
# include
void main()
{
int m1,m2,m3,m4,m5,m6,totalmark;
float perc;
char status;
clrscr();
printf("Enter SIX Subject Marks Separated by Space : ");
scanf("%d %d %d %d %d %d",&m1,&m2,&m3,&m4,&m5,&m6);

totalmark=m1+m2+m3+m4+m5+m6;
perc=totalmark/6;
printf("Total Mark = %d Percantage = %f
",totalmark,perc);

if (m1>=35 && m2>=35 && m3>=35 && m4>=35 && m5>=35 && m6>=35)
{
status='p';
printf("Status = Pass
");
if (perc>=75)
printf("Dist");
if (perc>=60 && perc<75)
printf("First class");
if (perc>=45 && perc<60)
printf("Second Class");
if (perc<45)
printf("Pass Class");
}
else
{
status='f';
printf("Status = Fail
");
}
getch();
}

[b]Output:[/b]
Enter SIX Subject Marks Separated by Spaces : 60 70 80 90 80 70
Total Marks = 450 Percantage = 75.000000
Status = Pass

Enter SIX Subject Marks Separated by Spaces : 50 40 30 60 50 30
Total Marks = 260 Percantage = 43.000000
Status = Fail