//********************************************
**************** cout<<"Enter your numeric grade: ";
//(04.29)3 FLOATING POINTS WHICH WILL cin>>x;
DETERMINE AND PRINT THE
//LOWEST AND THE HIGHEST POINT OF THE VALUE & if (x>=90 && x<=100)
THEIR AVERAGE. y='A';
//******************************************** else if (x>=80 && x<=89)
**************** y='B';
else if (x>=70 && x<=79)
#include <iostream> y='C';
#include <iomanip> else
#include <conio.h> y='D';
using namespace std; cout<<"\nYour numeric grade is "<<x;
cout<<"\nYour equivaleent grade is
int main () "<<y;
{
double x,y,z,min,max; getch();
cout<<"Enter first numbers: "; return 0;
cin>>x; }
SQUAREROOT-RECIPROCAL(SEL1)
cout<<"Enter second numbers: ";
cin>>y; 1. Write, compile, and run a C++ program
that accepts a user-entered number and
cout<<"Enter third numbers: "; calculates the values of the following:
cin>>z;
1
√user − entered numeber AND user−enetered number
if (x <= y)
min = x;
Before calculating the square root,
else
validate that the number is not
min = y;
negative, and before calculating the
if (z <= min)
reciprocal, check that the number is
min = z;
not zero. If either conditions occurs,
display a message stating that the
cout<<"\nLowest value is "<<min;
operation can’t be calculated.
if (x >= y)
#include <iostream>
max = x;
#include <conio.h>
else
#include <iomanip>
max = y;
#include <cmath>
if (z >= max)
max = z;
using namespace std;
cout<<"\nHighest value is "<<max;
int main ()
cout<<"\nTheir average value is
{
"<<((min + max)/2.0);
double x,s,r;
getch();
cout<<"This program calculates and
return 0;
print the square root and reciprocal of a
}
number.";
cout<<"\nEnter the number: ";
//********************************************
cin>>x;
*******************
//(04.29)WRITE A PROGRAM THAT ASK THE USER TO
if (x<=0)
ENTER
{
//NUMERIC GRADE. DETERMINE AND PRINT THE
cout<<"\nOperation can't be
EQUIVALENT LETTER GRADE.
calculated!";
//********************************************
getch();
*******************
return 0;
}
#include <iostream>
else
#include <conio.h>
s=sqrt(x);
#include <iomanip>
r=1/x;
using namespace std;
cout<<"\nThe square root value: "<<s;
cout<<"\nThe reciprocal value: "<<r;
int main ()
{
getch();
int x;
return 0;
char y;
}
STUDENT GRADE(SEL2)
2. Write a porgram that computes and
display the final grade of a
student in a coarse using
𝑄1 + 𝑄2 + 2𝑃𝐸 + 2𝐹𝐸
𝐹𝐺 =
6
Your program should display alse
the equivalent grade using table
given below:
FG EG
90-100 1.00
80-89 2.00
70-79 3.00
BELOW 70 5.00