0

cant compile the code...please help me!

import java.io.*;
class football
{
	public static void main(String args[])throws IOException
	{
	BufferedReader stdin = newBufferedReader(newInputStreamReader(System.in))
	
	String str;
	int num_team,num_win,num_draw,total_point,point;

	for(num_team=1;num_team;num_team++)

	System.out.print("Enter team compete");
	str=stdin.readLine();
	num_team=Integer.parseInt(str);

	System.out.print("Team 1");
	System.out.print("Enter total win");
	str=stdin.readLine();
	num_win=Integer.parseInt(str);
	
	System.out.print("Enter total draw");
	str=stdin.readLine();
	num_draw=Integer.parseInt(str);

	total_point=(num_win*3)+(num_draw);
	System.out.print("Total point for team 1 is" + num_team);
}
}

Edited by fyezool: n/a

5
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by Sadun89
0

Read the error messages, go to the lines they say and try to correct them.
Also do some studying. Most of the mistakes are because you failed to "copy" correctly the commands from your book or notes to the editor.
Look again how the commands are syntax-ed.

You should have examples on how to correctly use for-loops or how to create an object with "new":
new BufferedReader(...)
NOT
newBufferedReader(...)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.