yup both the errors are at that place!
Printable View
yup both the errors are at that place!
i dont mean to be a pain.. but there is very less time left to submit my assignment..
And you're still not using code tags. Please do so, it makes the code much easier to read.
Unfortunately that's not my problem.Quote:
i dont mean to be a pain.. but there is very less time left to submit my assignment
If you did what I have suggested you do without me having to repeat myself and having to keep asking for error messages and the latest code you would be a lot closer to finishing.
i am sorry but i am unfamiliar with code tags... how do i use them here?
i am so sorry i did in no way mean to offend you.... it just my first time doing this... and my nerves are getting the best of me!! but srsly thank you for being so patient with me! u have been nothing short of great help!
At the bottom of every one of my post in blue writing it shows to use them. You can either type them in or highlight your code and click on the code tags button ('#').
okay thank you so much for sticking with me all through this....i think this will be all now... wish me lcuk for my assignement....and i wish u the best luck!! hope i was'nt to much of a nuisance!
I definitely wish you luck. Do you have it working now?
[code]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public class MyHomework {
public static void main(String[] args){
int num = 0;
int excellentstudent;
excellentstudent = 0;
double percentage = 0;
Scanner scanner = new Scanner(System.in);
BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
String s = scanner.nextLine(); // bufferRead.readLine();
System.out.println(s);
num = scanner.nextInt();
int[] studentarray;
studentarray = new int[num];
int sum = 0;
for (int i = 0; i < studentarray.length; i++ ){
sum = sum + studentarray[num];
}
int gradecount = 0;
if (sum >= 90 ){
gradecount ++;
//Sorry i dont understand this
percentage = count * 100 / num;
System.out.printf("The percentage f excellent student is : %.1f", + percentage);
}
}
[code]
Code:import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public class MyHomework {
public static void main(String[] args){
int num = 0;
int excellentstudent;
excellentstudent = 0;
double percentage = 0;
Scanner scanner = new Scanner(System.in);
BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
String s = scanner.nextLine(); // bufferRead.readLine();
System.out.println(s);
num = scanner.nextInt();
int[] studentarray;
studentarray = new int[num];
int sum = 0;
for (int i = 0; i < studentarray.length; i++ ){
sum = sum + studentarray[num];
}
int gradecount = 0;
if (sum >= 90 ){
gradecount ++;
//Sorry i dont understand this
percentage = count * 100 / num;
System.out.printf("The percentage f excellent student is : %.1f", + percentage);
}
}
Sorry for triple post. Anyway that is the program, after i fixed error. Just ask if you dont under stand. I think you need to read more books because you need to know how to make a "function"(or called "method" in java) and "declare variable".