All pastes #1999213 Raw Edit

Informatyka - 23.11 - Najwiksza

public cpp v1 · immutable
#1999213 ·published 2010-11-22 19:14 UTC
rendered paste body
#include <cstdlib>#include <iostream>#include <conio.h>using namespace std;int najwieksza( int a[],int n ) {    int max = a[0];        for(int i = 0; i<=n-1;i++)            if(a[i] > max) max = a[i];    return max;}int main(int argc, char *argv[]){    int a[10];    cout << "Podaj 10 liczb. \n\n";    for(int i = 0; i<=9; i++)    {        cout << "Podaj "  << i+1 << " liczbe: ";        cin >> a[i];    }    cout << "Najwieksza: " << najwieksza(a,10);    getch();     }