-
December 18th, 2012, 05:08 PM
#31
Re: i need help writing a program using array. ASAP!
yup both the errors are at that place!
-
December 18th, 2012, 05:25 PM
#32
Re: i need help writing a program using array. ASAP!
i dont mean to be a pain.. but there is very less time left to submit my assignment..
-
December 18th, 2012, 05:32 PM
#33
Re: i need help writing a program using array. ASAP!
And you're still not using code tags. Please do so, it makes the code much easier to read.
-
December 18th, 2012, 05:37 PM
#34
Re: i need help writing a program using array. ASAP!
i dont mean to be a pain.. but there is very less time left to submit my assignment
Unfortunately that's not my problem.
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.
-
December 18th, 2012, 05:37 PM
#35
Re: i need help writing a program using array. ASAP!
i am sorry but i am unfamiliar with code tags... how do i use them here?
-
December 18th, 2012, 05:40 PM
#36
Re: i need help writing a program using array. ASAP!
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!
-
December 18th, 2012, 05:40 PM
#37
Re: i need help writing a program using array. ASAP!
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 ('#').
-
December 18th, 2012, 05:47 PM
#38
Re: i need help writing a program using array. ASAP!
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!
-
December 18th, 2012, 06:05 PM
#39
Re: i need help writing a program using array. ASAP!
I definitely wish you luck. Do you have it working now?
-
December 20th, 2012, 04:05 PM
#40
Re: i need help writing a program using array. ASAP!
[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]
-
December 20th, 2012, 04:07 PM
#41
Re: i need help writing a program using array. ASAP!
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);
}
}
-
December 20th, 2012, 04:09 PM
#42
Re: i need help writing a program using array. ASAP!
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".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|