min of array

min of array - Q: w r i t a C++ program to find minimum...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Q: w r i t a C++ program to find minimum number in an a r ray ? #include<stdio.h> #include<conio.h> #include<iostream.h> void main() { int a[10]; int min; //=================== array filling=============== for(int i=0;i<10;i++) { cout<<" a [ "<<i<<" ] ="<<endl; cin>>a[i]; } //==========calculate min number =========== min= a[0]; for(i=1;i<10;i++) { if (a[i] <min) min=a[i]; } cout<<" min num = "<<min; getch(); } ...
View Full Document

This note was uploaded on 10/16/2010 for the course ENG 2266e taught by Professor Aliraqi during the Spring '10 term at 4.1.

Page1 / 2

min of array - Q: w r i t a C++ program to find minimum...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online