January 2019 1 15 Report
Wyznaczyć minimum i maksimum w n-elementowej tablicy ?
gdzie robie błąd

# include
# include
# include
using namespace std;
int main()
{
srand(time(NULL));
int n;
cin >>n;
int tab[n];
for(int j=0;j {
tab[j]=rand()%10+3;
cout< }
int min=tab[0];
int max=tab[0];
for(int i=1;i<11;i++)
{
if(max max=tab[i];
if(min>tab[i])
min=tab[i];
}

cout< }
More Questions From This User See All

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.