Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by chuj ( 14 years ago )
#include "stdafx.h"
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
int main()
{
int n;
int i;
int a;
int max=1;
cout<<"Ile liczb chcesz wprowadzic?"<<endl;
cin>>n;
if(n>0)
{
for(i=1;i<=n;i++)
{
cout<<"Podaj kolejna liczbe:"<<endl;
cin>>a;
if(a>max)
{
max=a;
}
}
cout<<"Największa liczba to: "<<max<<endl;
}
else
{
cout<<"Liczba n nie moze byc mniejsza od zera"<<endl;
}
system ("pause");
return 0;
}
Revise this Paste