Lms Code Source File
Lms Code Source File
Group Members:
M. Rizwan: (B-28741)
Maryam Malik(B-28247)
Submitted To:
Sir Wasif Abid
Mam Mudassira
LMS Code:
#include<iostream>
#include<string>
#include<cmath>
void cources(){
cout<<" *********"<<endl;
cout<<" *********"<<endl<<endl;
void categories(){
cout<<endl;
cout<<"1. Attendance"<<endl;
cout<<"2. Quiz"<<endl;
cout<<"3. Transcript"<<endl;
void attendance(){
int d1;
int d2;
int d3;
int d4;
int d5;
int d6;
int d7;
int d8;
int d9;
int d10;
cout<<" ************"<<endl;
cout<<" ************"<<endl<<endl;
cout<<"Day 1"<<endl;
cin>>d1;
cout<<endl;
if(d1==1){
cout<<"Present";
else{
cout<<"Absent";
cout<<(d1/1)*100<<"%";
cout<<endl;
cout<<"Day 2"<<endl;
cin>>d2;
cout<<endl;
if(d2==1){
cout<<"Present";
else{
cout<<"Absent";
cout<<(d1+d2)*100/2<<"%";
cout<<endl;
cout<<"Day 3"<<endl;
cin>>d3;
cout<<endl;
if(d3==1){
cout<<"Present";
else{
cout<<"Absent";
cout<<(d1+d2+d3)*100/3<<"%";
cout<<endl;
cout<<"Day 4"<<endl;
cin>>d4;
cout<<endl;
if(d4==1){
cout<<"Present";
else{
cout<<"Absent";
cout<<(d1+d2+d3+d4)*100/4<<"%";
cout<<endl;
cout<<"Day 5"<<endl;
cin>>d5;
cout<<endl;
if(d5==1){
cout<<"Present";
cout<<" percentage : ";
else{
cout<<"Absent";
cout<<(d1+d2+d3+d4+d5)*100/5<<"%";
cout<<endl;
cout<<"Day 6"<<endl;
cin>>d6;
cout<<endl;
if(d6==1){
cout<<"Present";
else{
cout<<"Absent";
cout<<(d1+d2+d3+d4+d5+d6)*100/6<<"%";
cout<<endl;
cout<<"Day 7"<<endl;
cin>>d7;
cout<<endl;
if(d7==1){
cout<<"Present";
else{
cout<<"Absent";
cout<<(d1+d2+d3+d4+d5+d6+d7)*100/7<<"%";
cout<<endl;
cout<<"Day 8"<<endl;
cin>>d8;
cout<<endl;
if(d8==1){
cout<<"Present";
else{
cout<<"Absent";
cout<<(d1+d2+d3+d4+d5+d6+d7+d8)*100/8<<"%";
cout<<endl;
cout<<"Day 9"<<endl;
cin>>d9;
cout<<endl;
if(d9==1){
cout<<"Present";
}
else{
cout<<"Absent";
cout<<(d1+d2+d3+d4+d5+d6+d7+d8+d9)*100/9<<"%";
cout<<endl;
cout<<"Day 10"<<endl;
cin>>d10;
cout<<endl;
if(d10==1){
cout<<"Present";
else{
cout<<"Absent";
cout<<(d1+d2+d3+d4+d5+d6+d7+d8+d9+d10)*100/10<<"%";
void transcript(){
cout<<" ************************"<<endl;
cout<<" ************************"<<endl<<endl;
int mid;
int final;
int attendance;
int quiz;
int assignment;
int project;
int tm;
tm=0;
cin>>mid;
if(mid>20){
cout<<"Invalid Entry";
tm=tm+mid;
cout<<endl;
cin>>final;
if(final>35){
cout<<"Invalid Entry";
tm=tm+final;
cout<<endl;
cin>>attendance;
if(attendance>5){
cout<<"Invalid Entry";
tm=tm+attendance;
cout<<endl;
cin>>quiz;
if(quiz>10){
cout<<"Invalid Entry";
}
tm=tm+quiz;
cout<<endl;
cin>>assignment;
if(assignment>10){
cout<<"Invalid Entry";
tm=tm+assignment;
cout<<endl;
cin>>project;
if(project>20){
cout<<"Invalid Entry";
tm=tm+project;
cout<<endl;
cout<<" ***************"<<endl;
cout<<" ***************"<<endl<<endl;
if(tm<=100&&tm>=90){
else if(tm<=89&&tm>=80){
else if(tm<=79&&tm>=70){
cout<<"Your External Grade is : B";
else if(tm<=69&&tm>=60){
else if(tm<=59&&tm>=50){
else{
char quiz1(){
char q1;
char q2;
char q3;
char q4;
char q5;
int tq;
tq=0;
cout<<" ******"<<endl;
cout<<" ******"<<endl<<endl;
cout<<endl<<endl;
cout<<"Enter Your Answer : ";
cin>>q1;
if(q1=='b'||q1=='B'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"a) malloc()";
cout<<endl<<"b) alloc()";
cout<<endl<<"c) new";
cout<<endl<<"d) allocate()";
cout<<endl<<endl;
cin>>q2;
if(q2=='c'||q2=='C'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cin>>q3;
if(q3=='b'||q3=='B'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<endl;
cin>>q4;
if(q4=='d'||q4=='D'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"a) ;";
cout<<endl<<"b) :";
cout<<endl<<"c) ,";
cout<<endl<<"d) .";
cout<<endl<<endl;
cin>>q5;
if(q5=='a'||q5=='A'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
char quiz2(){
char q1;
char q2;
char q3;
char q4;
char q5;
int tq;
tq=0;
cout<<" ******"<<endl;
cout<<" ******"<<endl<<endl;
cout<<endl<<"A) <ul>";
cout<<endl<<"B) <ol>";
cout<<endl<<"C) <li>";
cout<<endl<<"D) <list>";
cout<<endl<<endl;
cin>>q1;
if(q1=='a'||q1=='A'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"In CSS, which property is used to change the text color of an element?";
cout<<endl<<"A) text-color";
cout<<endl<<"B) font-color";
cout<<endl<<"C) color";
cout<<endl<<"D) text-style";
cout<<endl<<endl;
cin>>q2;
if(q2=='c'||q2=='C'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"A) <a>";
cout<<endl<<"B) <link>";
cout<<endl<<"C) <hyperlink>";
cout<<endl<<"D) <href>";
cout<<endl<<endl;
cin>>q3;
if(q3=='d'||q3=='D'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<endl;
cin>>q4;
if(q4=='a'||q4=='A'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"Which CSS property is used to control the spacing between lines of text?";
cout<<endl<<"A) line-height";
cout<<endl<<"B) text-spacing";
cout<<endl<<"C) line-spacing";
cout<<endl<<"D) text-height";
cout<<endl<<endl;
cin>>q5;
if(q5=='a'||q5=='A'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
char quiz3(){
char q1;
char q2;
char q3;
char q4;
char q5;
int tq;
tq=0;
cout<<" ******"<<endl;
cout<<" ******"<<endl<<endl;
cout<<"Which keyword is used to declare a variable in JavaScript?";
cout<<endl<<"A) var";
cout<<endl<<"B) int";
cout<<endl<<"C) let";
cout<<endl<<"D) const";
cout<<endl<<endl;
cin>>q1;
if(q1=='a'||q1=='A'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"A) 10";
cout<<endl<<"B) 55";
cout<<endl<<"C) 55";
cout<<endl<<"D) Error";
cout<<endl<<endl;
cin>>q2;
if(q2=='c'||q2=='C'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
}
cout<<endl<<"A) addEventListener()";
cout<<endl<<"B) attachEvent()";
cout<<endl<<"C) bindEvent()";
cout<<endl<<"D) listenEvent()";
cout<<endl<<endl;
cin>>q3;
if(q3=='a'||q3=='A'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<endl;
cin>>q4;
if(q4=='c'||q4=='C'){
cout<<endl<<"Correct";
tq++;
}
else{
cout<<endl<<"Wrong";
cout<<endl<<endl;
cin>>q5;
if(q5=='a'||q5=='A'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
char quiz4(){
char q1;
char q2;
char q3;
char q4;
char q5;
int tq;
tq=0;
cout<<" ******"<<endl;
cout<<" ******"<<endl<<endl;
cout<<endl<<"A) Foundation";
cout<<endl<<"B) Skeleton";
cout<<endl<<"C) Materialize";
cout<<endl<<endl;
cin>>q1;
if(q1=='d'||q1=='D'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"A) .navbar-collapse";
cout<<endl<<"B) .nav";
cout<<endl<<"C) .navbar-toggle";
cout<<endl<<"D) .navbar";
cout<<endl<<endl;
cin>>q2;
if(q2=='d'||q2=='D'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"Which meta tag required in the head section of HTML document for Bootstrap
to work properly on mobile devices?";
cout<<endl<<endl;
cin>>q3;
if(q3=='b'||q3=='B'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"A) .grid";
cout<<endl<<"B) .container";
cout<<endl<<"C) .row";
cout<<endl<<"D) .col";
cout<<endl<<endl;
cin>>q4;
if(q4=='c'||q4=='C'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"Which CDN (Content Delivery Network) hosts the official Bootstrap files?";
cout<<endl<<"B) jQuery";
cout<<endl<<"C) BootstrapCDN";
cout<<endl<<"D) Cloudflare";
cout<<endl<<endl;
cin>>q5;
if(q5=='c'||q5=='C'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
char quiz5(){
char q1;
char q2;
char q3;
char q4;
char q5;
int tq;
tq=0;
cout<<" ******"<<endl;
cout<<" ******"<<endl<<endl;
cout<<endl<<endl;
cin>>q1;
if(q1=='b'||q1=='B'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<"A) Consistency";
cout<<endl<<"B) Clarity";
cout<<endl<<"C) Complexity";
cout<<endl<<"D) Simplicity";
cout<<endl<<endl;
cout<<"Enter Your Answer : ";
cin>>q2;
if(q2=='c'||q2=='C'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<endl;
cin>>q3;
if(q3=='c'||q3=='C'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<endl;
cin>>q4;
if(q4=='c'||q4=='C'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
cout<<endl<<endl;
cin>>q5;
if(q5=='c'||q5=='C'){
cout<<endl<<"Correct";
tq++;
else{
cout<<endl<<"Wrong";
}
int main(){
string name;
string rollno;
int password;
cout<<" **************"<<endl;
cout<<" **************"<<endl;
cin>>name;
cin>>rollno;
cin>>password;
cout<<endl<<endl;
system("cls");
int category;
int subcategory;
cources();
cin>>category;
system("cls");
switch(category)
case 1:
cout<<endl;
categories();
cout<<endl;
system("cls");
if(subcategory==1){
attendance();
else if(subcategory==2){
quiz1();
else{
transcript();
break;
case 2:
cout<<endl;
categories();
cin>>subcategory;
cout<<endl;
system("cls");
if(subcategory==1){
attendance();
else if(subcategory==2){
quiz2();
else{
transcript();
}
break;
case 3:
cout<<endl;
categories();
cin>>subcategory;
cout<<endl;
system("cls");
if(subcategory==1){
attendance();
else if(subcategory==2){
quiz3();
else{
transcript();
break;
case 4:
cout<<endl;
categories();
cin>>subcategory;
cout<<endl;
system("cls");
if(subcategory==1){
attendance();
else if(subcategory==2){
quiz4();
else{
transcript();
break;
case 5:
cout<<endl;
categories();
cin>>subcategory;
cout<<endl;
system("cls");
if(subcategory==1){
attendance();
else if(subcategory==2){
quiz5();
else{
transcript();
break;
default:
cout<<"Invalid Entry";
}