You are on page 1of 6

BEE-1 (A, B)

Deadline: December 24th, 2018


Note: All programs must be coded using C. All codes will be checked against
plagiarism and copied assignment will straight away get ZERO marks.

1. Write a program to code the following Boolean circuit. Calculate ‘Y’ and show the output
when given different combination of binary inputs for A, B and C. (Hint: use data type bool)

#include<conio.h>
#include<iostream>
using namespace std;
int main()
{
int k, l, m, output;
cout << "K" << "|" << "L" <<"|"<< "M" << "|" << "Output(Y)" << endl;
cout << "-------------" << endl;
for (k = 0; k<= 1; k++)
{
for (l= 0; l <= 1; l++)
{
for (m = 0; m <= 1; m++)
{
bool output = ~((~k) &l&~(l&m)) | (l&~(l&m) | l & m);
cout << k << "|" << l << "|" << m << "=" << output << endl;

}
}

}
_getch();
}
2. You have to design a code in C where you have to put marks of 4 Quizzes, 4
Assignments, Midterm Exam and Final Term Exam, you have to display aggregate marks
and grade of Course. Grading System is as under
Grade
A >=85
A- 80-85
B+ 75- 80
B 71- 75
B- 68- 71
C+ 64-68
C- 60- 64
D+ 57-60
D 53- 57
F 50- 53

#include<iostream>
#include<conio.h>
using namespace std;
void main()
{
float q1, q2, q3, q4, q;
float a1, a2, a3, a4, a;
float mid, final, agg, grade;
cout << " quiz 1 \n";
cin >> q1;
cout << "quiz 2 \n";
cin >> q2;
cout << " quiz 3 \n";
cin >> q3;
cout << “ quiz 4 \n";
cin >> q4;
cout << " assignment 1 \n";
cin >> a1;
cout << " assignment 2 \n";
cin >> a2;
cout << " assignment 3 \n";
cin >> a3;
cout << " assignment 4 \n";
cin >> a4;
cout << " mids out of 20 \n";
cin >> mid;
cout << " finals out of 50 \n";
cin >> final;
q = (q1 + q2 + q3 + q4) / 4;
a = (a1 + a2 + a3 + a4) / 4;
agg = q + a + final + mid+10;
cout << "aggregate marks are \n" << agg<<"\n and grade is \t";
if (agg >= 85)
{
cout << "A";
}
else if (agg >= 80 || agg < 85)
{
cout << "A-";
}
else if (agg >= 75 || agg < 80)
{
cout << "B+";
}
else if (agg >= 71 || agg < 75)
{
cout << "B";
}
else if (agg >= 68 || agg < 715)
{
cout << "B-";
}
else if (agg >= 64 || agg < 68)
{
cout << "C+";
}
else if (agg >= 60 || agg < 65)
{
cout << "C-";
}
else if (agg >= 57 || agg < 60)
{
cout << "D+";
}
else if (agg >= 53 || agg < 57)
{
cout << "D";
}
else if (agg >= 50 || agg < 53)
{
cout << "F";
}
else
{
cout << "there is some mistake in entering marks \n please try again";
}

_getch();
}

#include<stdio.h>
#include<conio.h>
#include<iostream>
using namespace std;
int main()
{
float q1, q2, q3, q4, q;
float a1, a2, a3, a4, a;
float mid, final, agg, grade;
printf("enter the marks of quiz 1 \n");
scanf("%f",&q1);
printf("enter the marks of quiz 2 \n ");
scanf("%f",&q2);
printf("enter the marks of quiz 3 \n ");
scanf("%f",&q3);
printf("enter the marks of quiz 4 \n");
scanf_s("%f",&q4);
printf(" assignment marks 1 \n ");
scanf_s("%f",&a1);
printf("assignment marks 2 \n");
scanf_s("%f",&a2);
printf(" assignment marks 3 \n");
scanf_s("%f",&a3);
printf(" assignment marks 4 \n");
scanf_s("%f",&a4);
printf(" midsmarks out of 20 \n");
scanf_s("%f",&mid);
printf(" marks of finals out of 50 \n");
scanf_s("f%",&final);
q = (q1 + q2 + q3 + q4) / 4;
a = (a1 + a2 + a3 + a4) / 4;
agg = q + a + final + mid + 10;
printf("aggregate marks are \n ");
printf("%f",&agg);
printf("\n and grade is \n");
if (agg >= 85)
{
printf("A");
}
else if (agg >= 80 || agg < 85)
{
printf("A-");
}
else if (agg >= 75 || agg < 80)
{
printf("B+");
}
else if (agg >= 71 || agg < 75)
{
printf("B");
}
else if (agg >= 68 || agg < 715)
{
printf("B-");
}
else if (agg >= 64 || agg < 68)
{
printf("C+");
}
else if (agg >= 60 || agg < 65)
{
printf("C-");
}
else if (agg >= 57 || agg < 60)
{
printf("D+");
}
else if (agg >= 53 || agg < 57)
{
printf("D");
}
else if (agg >= 50 || agg < 53)
{
printf("F");
}
else
{
printf("there is some mistake in entering marks \n please try again");

_getch();
}

3. Develop a grading System in Excel with the following characteristics

You have to develop a system that is able to formulate whole Grading System for your
semester. Where you have to put marks of 4 Quizzes, 4 Assignments, Midterm Exam and
Final Term Exam for 35 students. The System would calculate total marks for every course
and display Scatter plot for every course. Finally Display semester GPA.

(Assignments weightage :20%, Quiz Weightage: 10%, Mid-term Exam: 20%, Final Term
Exam: 50% )

You might also like