0% found this document useful (0 votes)
6 views4 pages

Include

The document contains multiple C++ programs that perform different tasks. The first program finds the minimum value from an array of 10 integers, the second finds the maximum value, the third counts the total prime numbers from another array of 10 integers, and the last program identifies the student with the highest marks from a list of roll numbers and their corresponding marks. Each program prompts the user for input and displays the results accordingly.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Include

The document contains multiple C++ programs that perform different tasks. The first program finds the minimum value from an array of 10 integers, the second finds the maximum value, the third counts the total prime numbers from another array of 10 integers, and the last program identifies the student with the highest marks from a list of roll numbers and their corresponding marks. Each program prompts the user for input and displays the results accordingly.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

#include <iostream>

using namespace std;

int main() {

int arr[10],i,min;

for(i=0;i<10;i++)

cout<<"Enter value:";

cin>>arr[i];

min=arr[0];

for(i=0;i<10;i++)

if(min>arr[i])

min=arr[i];

cout<<"Minimum value:"<<min;

return 0;

#include <iostream>

using namespace std;

int main() {

int arr[10],i,max;

for(i=0;i<10;i++)

cout<<"Enter value:";

cin>>arr[i];

max=arr[0];
for(i=0;i<10;i++)

if(max<arr[i])

max=arr[i];

cout<<"Maximum value:"<<max;

Hjdshdjhfjhuhrjfhiuehfjhjfh

#include <iostream>

using namespace std;

int main()

int arr[10];

int count = 0;

cout << "Enter 10 numbers:\n";

for(int i = 0; i < 10; i++)

cin >> arr[i];

for(int i = 0; i < 10; i++)

int num = arr[i];

int prime = 1;

if(num <= 1)

prime = 0;

for(int j = 2; j < num; j++)

if(num % j == 0)

prime = 0;

}
if(prime == 1)

count++;

cout << "Total Prime Numbers: " << count;

return 0;

Sjahjhajhjhajhjhajhsjsin

#include <iostream>

using namespace std;

int main()

int roll[5];

int marks[5];

int max = 0;

for(int i = 0; i < 5; i++)

cout << "Enter roll number: ";

cin >> roll[i];

cout << "Enter marks: ";

cin >> marks[i];

for(int i = 1; i < 5; i++)

if(marks[i] > marks[max])

max = i;
}

cout << "Roll No: " << roll[max] << endl;

cout << "Marks: " << marks[max];

return 0;

You might also like