### Find the highest (maximum) and lowest (minimum) grades in an array of 25 integer grades. Print the array and print the highest and lowest grades, labeled appropriately

Task:  Find the highest (maximum) and lowest (minimum) grades in an array of 25 integer grades.  Print the array and print the highest and lowest grades, labeled appropriately. Try to enter all kind of integer grades in your array.

Hits of integer grades:

A+ is a Letter Grade.
A is  a Letter Grade.
4 is an Integer Grade.
3.75 is an Integer Grade.
So we may assume that 'A+' = 4, A = 3.75 etc.

Source Code

#include<stdio.h>
#include<conio.h>
{
float min=0,max=0;
int i;
for(i=0;imax)
{
}
}

for(i=0;i<size;i++)
{
{
}
}
printf("\n");
printf("\n");
}
int main()
{
printf("Enter the size of an Array:\n");
scanf("%f",&size);
printf("Enter the Grade point:\n");
return 0;
}
<< Go to Index Page >>

1. #include
#include
#include
{
float min=0,max=0;
int i;
for(i=0;imax)
{
}
}

for(i=0;i<size;i++)
{
{
}
}
printf("\n");
printf("\n");
}
int main()
{
printf("Enter the size of an Array:\n");
scanf("%f",&size);
printf("Enter the Grade point:\n");
return 0;
}

2. using C++
#include

using namespace std;

int main()
{
int arr[25], i, temp, j;
for(i = 0; i < 5; i++){
cout << "Enter " << i+1 << " data --: ";
cin >> arr[i];
}

cout << "You entered data is bellow --: \n";
for (i = 0; i < 5; i++){
cout << i+1 << " data is --:";
cout << arr[i] << "\n";
}
cout << "\n";
for (j = 0; j < 4; j++){
for (i = 0; i < 4; i++){
if (arr[i] > arr[j+1]){
temp = arr[i];
arr[i] = arr[j+1];
arr[j+1] = temp;
}
}
}
cout << "\n";

cout << "Array in sorted bellow --:\n";

for (i = 0; i < 5; i++){
cout << "Data " << i+1 << " is --: ";
cout << arr[i];
cout << "\n";
}

cout << "\n" << "The minimum value is --: " << arr[0] << "\n";
cout << "\n" << "The maximum value is --: " << arr[4] << "\n";

return 0;

}

3. using C++
#include

using namespace std;

int main()
{
int arr[25], i, temp, j;
for(i = 0; i < 5; i++){
cout << "Enter " << i+1 << " data --: ";
cin >> arr[i];
}

cout << "You entered data is bellow --: \n";
for (i = 0; i < 5; i++){
cout << i+1 << " data is --:";
cout << arr[i] << "\n";
}
cout << "\n";
for (j = 0; j < 4; j++){
for (i = 0; i < 4; i++){
if (arr[i] > arr[j+1]){
temp = arr[i];
arr[i] = arr[j+1];
arr[j+1] = temp;
}
}
}
cout << "\n";

cout << "Array in sorted bellow --:\n";

for (i = 0; i < 5; i++){
cout << "Data " << i+1 << " is --: ";
cout << arr[i];
cout << "\n";
}

cout << "\n" << "The minimum value is --: " << arr[0] << "\n";
cout << "\n" << "The maximum value is --: " << arr[4] << "\n";

return 0;

}

4. #include
using namespace std;

int main(){
float arr[20], value, temp;
int period,i,j;

cout<<"How many students : ";
cin>>period;

cout<<"Enter the grades : ";
for(i=0; i>arr[i];
}

for(i=0; iarr[j+1]){
temp=arr[j];
arr[j]=arr[j+1];
arr[j+1]=temp;

}
}
}

for(i=0; i<period; i++){
cout<<arr[i];
}

cout<<endl<<"maximum grade is: "<<arr[period-1];
cout<<endl<<"minimum grade is: "<<arr[0];

return 0;
}

5. #include
using namespace std;
int main()
{
float temp,s;
int i,j;
cout<<"How many Student: ";
cin>>s;
float a[40];
cout<<"Input"<< s <<"students grade: ";
for(i=0; i>a[i];
for (i=0; i<(s-1); i++)
{
for (j=0; ja[j+1])
{
temp= a[j];
a[j]= a[j+1];
a[j+1]=temp;
}
}
}

cout<<a[40-1]<<endl;
cout<<a[0];
}

6. Appel mahmud akib. Id:201510384

#include
using namespace std;
int main()
{
float temp;
int i,j,s;
cout<<"How many Student: ";
cin>>s;
float a[s];
cout<>a[i];
for (i=0; i<(s-1); i++)
{
for (j=0; ja[j+1])
{
temp= a[j];
a[j]= a[j+1];
a[j+1]=temp;
}
}
}

cout<<endl<<a[s-1]<<endl;
cout<<a[0]<<endl;
}

7. #include
using namespace std;
int main()
{
float temp;
int i,j,s;
cout<<"How many Student: ";
cin>>s;
float a[s];
cout<<"Input"<>a[i];
for (i=0; i<(s-1); i++)
{
for (j=0; ja[j+1])
{
temp= a[j];
a[j]= a[j+1];
a[j+1]=temp;
}
}
}

cout<<endl<<a[s-1]<<endl;
cout<<a[0]<<endl;
}

8. #include

using namespace std;

int main()
{
int arr[25], i, temp, j;
for(i = 0; i < 5; i++){
cout << "Enter " << i+1 << " data --: ";
cin >> arr[i];
}

cout << "You entered data is bellow --:";
for (i = 0; i < 5; i++){
cout << i+1 << " data is --:";
cout << arr[i] << "\n";
}
cout << "\n";
for (j = 0; j < 4; j++){
for (i = 0; i < 4; i++){
if (arr[i] > arr[j+1]){
temp = arr[i];
arr[i] = arr[j+1];
arr[j+1] = temp;
}
}
}
cout << "\n";

cout << "Array in sorted bellow --:\n";

for (i = 0; i < 5; i++){
cout << "Data " << i+1 << " is --: ";
cout << arr[i];
cout << "\n";
}

return 0;

}

9. Using C++
Mamun ID 149
#include

using namespace std;

int main()
{
int arr[25], i,j,p;
for(i = 0; i < 5; i++){
cout << "Enter your deserve number : " << " data --: ";
cin >> arr[i];
}

cout < arr[j+1]){
p = arr[i];
arr[i] = arr[j+1];
arr[j+1] = p;
}
}
}
cout <<endl;

cout << "Array in sorted bellow --:"<<endl;

for (i = 0; i < 5; i++){
cout << "Data " << i+1 << " is --: ";
cout << arr[i];
cout <<endl;
}

return 0;

}

10. using c++

#include
using namespace std;
int main()
{
float temp;
int i,j,s;
cout<<"How many Student: ";
cin>>s;
float a[s];
cout<<"Input"<>a[i];
for (i=0; i<(s-1); i++)
{
for (j=0; ja[j+1])
{
temp= a[j];
a[j]= a[j+1];
a[j+1]=temp;
}
}
}

cout<<endl<<a[s-1]<<endl;
cout<<a[0]<<endl;
}

11. #include
using namespace std;

int main()
{
int arr[25],i,j,temp;

for(i=0; i<5; i++){
cout <<"Enter "<>arr[i];
}
for(j=0; j<4; j++){
for(i=0; i<4; i++){
if (arr[i]>arr[j+1]){
temp=arr[i];
arr[i]=arr[j+1];
arr[j+1]=temp;
}
}
}
cout <<"Array in sorted bellow: "<< endl;

for(i=0; i<5; i++){
cout <<"Data "<< i+1<< " is: "<<arr[i]<< endl;

}
cout <<"The minimum value is: "<<arr[0]<<"\n";
cout <<"The maximum value is: "<<arr[4];

return 0;
}
id:201510992

12. // biggest and smallest number

#include

using namespace std;

int main ()
{

int values[ 20 ];
int small,big;
for ( int i = 0; i < 20; i++ )
{
cout << "Enter value " << i << ": ";
cin >> values[i];
}
for (int i = 0; i < 20; i++)
{
if(values[i]>big)
{
big=values[i];
}
if(values[i]<small)
{
small=values[i];
}
}
cout << "The biggest number is " << big << endl;
cout << "The smallest number is " << small << endl;
}

13. Summer 2017
ID#201610042

Answer to the Question No. 3:

14. ID : 201620195

15. ID 201610456
MD USUF MIA

16. ID:201520552

17. ID 201610456
MD USUF MIA