Assignment 6 and 7
Assignment 6 and 7
Assignment 6 and 7
#include "pch.h"
#include <iostream>
using namespace std;
return avg;
}
int main()
{
int size, j;
cout << "Hi! This is Naeem Zainuddin Reg. No. 1845120" << endl;
cout << "Enter the length of the quizzes" << endl;
cin >> size;
float b, n[5];
for (j = 1; j <= size; j++)
{
cout << "Enter Quizzes mark " << j << " : " << endl;
cin >> n[j];
}
b = average(n, size);
cout << "Average of marks is: " << b << endl;
system("pause");
return 0;
}
#include "pch.h"
#include <iostream>
using namespace std;
float pi, a, r, l, w, b, c, h;
float d, e, f, g;
char x;
int main()
{
cout << "Hi! this is Naeem Zainuddin .. Reg. No. 1845120" << endl;
cout << "select Shape which you want to find their Area by using C,S,R,T" << endl;
cin >> x;
switch (x)
{
case 'c':
{
Circle(pi, r);
break;
}
case 's':
{
Square(a);
break;
}
case 'r':
{
Rectangle(l, w);
break;
}
case 't':
{
Trapezium(b, c, h);
break;
}
default:
{
cout << "error Your Shape is undefine" << endl;
break;
}
}
system("pause");
return 0;
}
a) Library Function:
The C++ Standard Library provides a rich collection of functions for performing
common mathematical calculations, string manipulations, character manipulations,
input/output, error checking and many other useful operations.