Object Oriented Programming Lab Report#02 Class and Section
Object Oriented Programming Lab Report#02 Class and Section
LAB REPORT#02
DATE: 07-10-2020
Question 1: Take 10 integer inputs from user and store them
in an array and print them
on screen.
#include <iostream>
using namespace std;
int main()
{
int arr[10];
int temp;
{
cin >> arr[z];
}
{
cout<<arr[z]<<"\n";
}
system ("pause");
return 0;
}
Question 2: Write down a program to input 10 numbers in
array and to find their sum?
#include <iostream>
using namespace std;
int main()
{
int arr[10];
int sum=0;
system ("pause");
return 0;
}
#include <iostream>
using namespace std;
for(i=1;i<n;i++)
{
if(a[i]>max)
max =a[i];
}
return max;
}
int FindMin(int a[],int n)
{
int i, min;
min = a[0];
for(i=1;i<n;i++)
{
if(a[i]<min)
min =a[i];
}
return min;
}
int main()
{
int i, array[50], size, max, min;
max = FindMax(array,size);
min = FindMin(array,size);
return 0;
}