Skip to content
Snippets Groups Projects
Commit d1600b16 authored by Tero Heikkilä's avatar Tero Heikkilä
Browse files

Upload Pisin.java

parent 2fcba253
Branches
No related tags found
No related merge requests found
public class Pisin {
public static void main(String[] args) {
if (args.length == 0)
{
System.out.println("Ei parametreja");
}
else
{
int max_l = 0;
int max_i = 0;
for (int i = 0; i < args.length; i++)
{
int cur_l = args[i].length();
if (cur_l > max_l)
{
max_l = cur_l;
max_i = i;
}
}
System.out.println("Pisin parametri: " + args[max_i]);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment