-
Posts
17 -
Joined
-
Last visited
Awards
This user doesn't have any awards
Profile Information
-
Gender
Male
-
Location
Philippines
-
Interests
Programming
-
Biography
I'm a first-year college student taking up BSIT
-
Occupation
Student
System
-
CPU
AMD-A6-6400K APU with Radeon(tm) HD Graphics 3.90 GHz
-
Motherboard
GIGABYTE GA-F2A68HM-S1-rev-10
-
RAM
4x2 DDR3 Ram
-
GPU
Nvidia Gt-610 2GB
-
Storage
Seagate 1TB Harddrive
-
PSU
Generic 550w
-
Operating System
Windows 7 Ultimate 64x
REDRIDINGHOODS's Achievements
-
Please help me to display the inputted data in array
REDRIDINGHOODS replied to REDRIDINGHOODS's topic in Programming
I will try to learn this type of method but I still don't understand how an object works. I will try to learn on how this works. Also thank you for giving me a tip. I hope you have a nice day! -
Please help me to display the inputted data in array
REDRIDINGHOODS replied to REDRIDINGHOODS's topic in Programming
the thing is my professor didn't teach us the 2d arrays and I didn't know that it exist. Thank you for the tip also -
Please help me to display the inputted data in array
REDRIDINGHOODS replied to REDRIDINGHOODS's topic in Programming
thank you for the tip and explaning to me how 2d array works. I got my program fixed and ready to function well. You made my day thank you! -
Please help me to display the inputted data in array
REDRIDINGHOODS replied to REDRIDINGHOODS's topic in Programming
what if I had to enter the number students and the number of exams then store the each students scores in the array? like this (5).mkv -
Please help me to display the inputted data in array
REDRIDINGHOODS replied to REDRIDINGHOODS's topic in Programming
can you teach me how to create an object and explain how it works? -
Please help me to display the inputted data in array
REDRIDINGHOODS replied to REDRIDINGHOODS's topic in Programming
The user has 2 students and 2 exams which creates the number sets the value to the array. then the user inputs the id number (2 students) then inputs the exams(2 exams). the program would calculate the sum of each students scores and gets the average. the program would individualy prints the id number, scores and the average. sorry for my bad english -
Please help me to display the inputted data in array
REDRIDINGHOODS replied to REDRIDINGHOODS's topic in Programming
-
Good Day Everyone, I'm a first year student currently learning arrays using java. I created a program in which the user enters the id number and the test score, then it should compute its average and display the id number, test scores and average. The problem in my program which I can't display all the scores and average but it can display the inputted id number. Sorry for my bad english. import java.util.*; public class arrayactivity1 { static Scanner console = new Scanner(System.in); public static void main(String[] args) { int NumberofStudent = 0; int NumberofExam = 0; int k = 0; System.out.print("Enter the Numher of Students: "); NumberofStudent = console.nextInt(); System.out.print("\nEnter the Number of Exams: "); NumberofExam = console.nextInt(); int[] idNumber = new int[NumberofStudent]; int[] Exam = new int[NumberofExam]; System.out.println("\nEnter the Id Number of the Students: "); for(int i = 0 ; i < NumberofStudent ; i++)//Inputted ID Number of students from the user { idNumber[i] = console.nextInt(); } for(int i = 0 ; i < NumberofStudent ; i++)//prints the id number and enters the score of the student { System.out.println("\nId Number: " + idNumber[i]); System.out.println("Enter the Score of the Sudent: "); for(int j = 0; j < NumberofExam ; j++) { Exam[j] = console.nextInt(); } } int[] AverageScore = new int[NumberofExam]; int SumofAllExams = 0; int TotalofGivenExam = 0; TotalofGivenExam = Exam.length; for(int j = 0; j < NumberofExam ; j++)//calculates the sum of the exams of each students { SumofAllExams += Exam[j]; } for(int i = 0; i < NumberofExam ; i++)//calculates the average scores of each students { AverageScore[i] = SumofAllExams / TotalofGivenExam; } System.out.println("\n\n\t\t~RESULT~"); for(int i = 0; i < NumberofStudent ; i++)//prints out the id number of each students { System.out.println("\n\tId Number: " + idNumber[i]); System.out.println("\tScore of all the Exams: "); for(int j = 0 ; j < NumberofStudent ; j++) //prints out the scores exams of each students { k++; System.out.print("\tExam No." + k); System.out.println(" \tScore: \t" + Exam[j]); } System.out.println("\tAverage Score: " + AverageScore[i]); k = 0; } } }
-
REDRIDINGHOODS changed their profile photo
-
Salamat sa motivation.
-
thank you for the tip and sorry i used uppercase in my program. I'm trying my best to understand and learn programming in C.