View Code of Problem 58

import java.util.Scanner;

public class Main
{
  public static void main(String[] args)
  {
    Scanner scan=new Scanner(System.in);
    String str=scan.nextLine();
    String[] str1=str.split(" ");
    System.out.print(str1.length);
  }
}

Double click to view unformatted code.


Back to problem 58