|
-
December 18th, 2012, 12:33 PM
#3
Re: i need help writing a program using array. ASAP!
this what i have so far.. i just started java this semester so i bet its full of mistakes.
import java.util.Scanner;
public class Q7_A_112532 {
public static void main(System[] args){
Scanner input = new Scanner(System.in);
int num = 0;
int excellentstudent;
excellentstudent = 0;
double percentage = 0;
System.out.print("enter the total number of students: ");
num = input.nextInt();
int[] studentarray;
studentarray = new.int[num];
{for (i = 0; i < studentarray.lenght, i++ )
sum = sum + arr[num]
}
if (grade >= 90 )
gradecount ++;
percentage = count * 100 / num
System.out.printf("The percentage f excellent student is : %.1f", + percentage);
}
}
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
|