Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(){
- const int tam = 5;
- int vNum[tam];
- int i, num, menor, cantMenor=0;
- for (i = 0; i < tam; i++){
- cout<<"ingrese un num: ";
- cin>>num;
- vNum[i]=num;
- }
- menor = vNum[0];
- for (i = 0; i < tam; i++){
- if (vNum[i]<menor){
- menor = vNum[i];
- }
- }
- for (i = 0; i < tam; i++){
- if (vNum[i]==menor){
- cantMenor++;
- }
- }
- cout<<"el numero menor es: "<<menor<<endl;
- cout<<"cantidad de numeros iguales al menor: "<<cantMenor;
- cout<<endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment