C# :: Display Student Who Get Highest Marks

Aug 14, 2012

i wnt to display student who get highest marks among them...i have code for finding maximum marks from them but don't kne how to print only top 5 student...

Code:

static void Main(string[] args)
{
Console.WriteLine("Please Enter Number of Students :");
int n = Convert.ToInt32(Console.ReadLine());
StudentDetails[] student = new StudentDetails[n];
for (int row = 0; row < n; row++)
{
Console.WriteLine("Please Enter Student name :");

[Code]...

(dis code in Visual Studio)

View 6 Replies


ADVERTISEMENT

C :: Enter Test Marks Of Several Students And Calculates Average Marks Of Each Student

Mar 10, 2013

Write a program that a prof can use to enter the test marks of several students and which calculates the average mark of each student. Ask the user how many students he has, then ask him to enter each student's marks. When 999 is entered, calculate the average mark for that student (not counting the 999) and print the average. Then go on to the next students until the marks for all students have been entered, calculated and the average printed.

Code:
#include<stdio.h>
main() {
float student,mark,total=0;
float a,b,c;
int num = 999;
printf("

[Code] .....

View 2 Replies View Related

C :: Trying To Match Student ID With Highest Score Along With Grade

Nov 25, 2013

I am trying to correlate the student's highest score with that student's ID. The old code is in blue and the new code is in green which includes a sort. The particular information in question is in red.

Ide1

Code:
#include <stdio.h>
int main(void) {
/*Set up two arrays to include up to 50 elements each.*/
int st_numval_id[50] = {0}, st_val_tstscr[50]= {0}, i = 0, j = 0, temp;

[Code] .....

Enter the student's id and test score:

/*After the following input, then enter 0 to end the input*/

Student ID Test Score Letter Grade
------------ ----------- --------------
1653 77 C
1945 72 C
1020 50 F
1955 92 A
1900 81 B

ABOVE AVERAGE STUDENTS

Ave Test Score Students Above Ave Number of: A's B's C's D's F's
----------- ---------- --------- --- --- --- --- ---
62.00 4 1 1 2 0 1

THE STUDENT WITH THE HIGHEST TEST SCORE

Student ID Test Score Letter Grade
--------- ---------- ------------
1900 0 F

Press any key to continue...

View 1 Replies View Related

C/C++ :: Object Oriented Programming - How To Display Student With Given Attributes

Oct 27, 2013

Here is my code ... How to display student with given attributes ...

class student {
      private:
              int roll_no ;
              char name[30];
              char phone_no[15];
     
[Code] ....

View 1 Replies View Related

C++ :: Declaring A Display Function Prototype Only That Displays A Student Test Scores In The Format

Oct 28, 2013

so in declaring a display function prototype only that displays a student test scores in the format (student name tab number of scores tab test scores )

is this right?

#ifndef STUDENTTESTSCORES_H
#define STUDENTTESTSCORES_H
#include <string>
using namespace std;
class StudentTestScores{
private:

[Code]...

and also how do we call the display function if it is in a class from the header file onto the main cpp file.

View 2 Replies View Related

C++ :: Using Array - Display Highest And Lowest Numbers

Oct 1, 2013

I have everything down except for the highest # and lowest number being displayed.

The arrays are 23, 4, 76, 89, 12, 43, 37, 67, 21, 14.

I have the average which is 38.6 but i stuck getting highest number and lowest.

View 7 Replies View Related

C/C++ :: Cannot Display Top10 Students With Highest Votes

Feb 27, 2015

//USG ELECTION
//Voting Program
#include <iostream>

[Code]....

View 6 Replies View Related

C++ :: Array Searching - Display Highest And Lowest Number From User Input

Aug 26, 2013

I am having a problem printing out the results for my code, It is supposed to print out the largest and smallest value in the array, but keeps giving me a value not entered and I don't know why.

//This program lets the user enter 10 numbers and then display the highest and lowest number.

#include <iostream>
#include<stdio.h>
using namespace std;
int main() {
const int NUM_ENTERED = 9;
int number[NUM_ENTERED], highestValue = number[0], lowestValue = number[0], count=0;

[Code] .....

View 2 Replies View Related

C++ :: Bubble Sorting Vectors - Display Highest Temperature And Occurrence Time

Feb 12, 2013

I'm doing a project where I have to store information gathered (temperature and the time it was taken in seconds) in two separate vectors. After an unknown amount of data has been entered, and the end-of-file has been reached, I have to display the highest temperature and the time(s) it occured (bear in mind that the highest temperature may be recorded more than once). The output of that part should be as follows:

Highest temperature: 51
Recorded at time(s):
22:45
2:27

Something like that. The time should also be converted to hours and minutes. To the point: I've done some research on bubble sorting, but they only use it for arrays.

View 3 Replies View Related

C/C++ :: Put 2 Marks For Each Question Correct?

Jun 13, 2014

#include <iostream>
#include <string>
using namespace std;
void secondq();
void thirdq();

[Code]....

View 2 Replies View Related

C++ :: Adding Students And Calculating Their Marks

Feb 20, 2013

I need to write a program on that language. I start with the explanation: The program has 3 tasks:

First: User can add the First Names, Second Names, Third Names and the Marks of a students.
Second: The program can calculate the Avarege Marks of the students.
Third: To show the students that have marks more than 5.50.

View 1 Replies View Related

C++ :: Write A Program To Store Marks Obtained By 50 Students?

Feb 28, 2014

Q.1 Write a program to store marks obtained by 50 students. Initialise the array having passed to a function initilise() having passed the array as parameter. Write another function which should take this array as parameter and return the highest score from the array. you have to write the proper function call, prototype and definition for each function.

And this is the program which i wrote and got errors: -

#include<iostream.h>
#include<conio.h>
#define s 50
void init(int m[s]);
void display(int m[s]);
void find_max(int max, int m[s]);
void main(){
clrscr();
int max;

[code]....

View 1 Replies View Related

C++ :: Printing Name And GPA Of Student?

Feb 17, 2015

#include <iostream>
#include <string>
using namespace std;
struct studentType {
string name;
double gpa;

[Code] .....

View 11 Replies View Related

C :: How To Get The Average Score For Each Student

Nov 10, 2013

I have to get the average score for each student. And modify my avgmarks function and write the marks to a output txt file.

Code:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>

int bubble(int*,int);
void filewrite();
void avgmarks();
void fileprint();
void filesort();
void rollin();

[Code] .....

View 1 Replies View Related

C++ :: Student Grades Do Not Print?

Mar 26, 2013

//******************************************************************************
// GradeCalculator.cpp
// Input: Student Grades in Each Category
// Output: Final Grade, Numerical Grade, Witty Comment
// Final Grade Calculator
// This program calculates a final grade using a formula, assigns a
// corresponding letter grade, and outputs a "witty" comment to the user.
//******************************************************************************

#include <iostream>
#include <fstream> // For file I/O
#include <string>
#include <iomanip>
#include <cmath>

using namespace std;

// Declare function prototypes
void OpenFiles(ifstream&, ofstream&);

[Code] .....

View 1 Replies View Related

C/C++ :: Student ADT - How To Delete A Record

Feb 24, 2014

My assignment for class was to create a Student ADT. I have three files. First one is Student.h which defines a Student record and has the prototypes of the functions that can be used with Student. I have Student.cc which is where the functions are actually declared. And my final file is testStudent.cc where the "main" function is that is creating a Student and callign all of the functions to make sure they work properly.

I have all of the functions working properly, except for my destroyStudentRecord function. It is supposed to deallocate the record, but I am unsure of how to actually do this. The current implementation appears to only deallocate the firstName field, as when you display the record after deallocationg it, everything still shows up except the first name. I have tried deallocating each field of the record before deallocating the record itself and that gave me the biggest list of errors I have ever seen.

I realize the implementation of some things in here might be a bit odd, but this is exactly how we are required to do things for this assignment and nothing about the implementation can really be changed unless something is actually just plain wrong(which is of course a possibility as I am quite new to this!). As I said though, everything else is working exactly as it should be, so my only issue at all is with actually deleting the record once I have created one.

Student.h:

#include <iostream>
#include <cstdlib>
using namespace std;
#ifndef _STUDENT_H_
#define _STUDENT_H_
struct Student {

[Code] ....

View 9 Replies View Related

C :: Add More Student Information To The Specific Txt File?

Mar 12, 2013

I'm trying to add more student information to the specific txt file. I did struct my student information and separated it with an array with max size of 200.

The inside of my current file looks like

Toshi
Aka
Nonal
Donald

The first one represent student[0] and next one is student[1] and so on till student[199]. Right now, only 4 space is occupied, which means the array has information till student[3] but not from student[4] (I guess it has null condition).

What I want to do is, I want to add a new student information to student[4] and till student[199] once at each time.

So, my prompt will look like
Would like to add a new student? Y/N
(if yes goes to below statement and exit if NO)
Hi. Please enter the information of new student. ___________
Student added. Please press any key to continue.

If the key is pressed, it goes back to my initial prompt and continues till I press N.

I sure I'm not using for loop to do this thing, because I'm adding student name one by one.

However, the array is already occupied by other student name till student[3] so, I want to add a new student information to student[4] (I don't want to overwrite the current information). And if student[4] is occupied, then [5] and so on.

View 7 Replies View Related

C++ :: Linked List Of Student Database

Mar 6, 2013

I've remade a program to store student database using linked list. When I try to display the list of student with their information (It displays nothing)

Code:
#include <iostream>
#include <string>
using namespace std;
struct StudentRecord {

[Code] ....

View 4 Replies View Related

C++ :: How To Change Just A Single Student Data

Jan 6, 2015

For Example i have made a text file included some students data. Now i want to change just a single student data. That file should remain same just that student's data replace.

View 3 Replies View Related

C++ :: What Is Process Of Student Profiling System

Oct 3, 2014

what is the process of student profiling system using c++?

View 2 Replies View Related

C++ :: Linked List To Store Student ID And GPA

Apr 2, 2014

So I have to store a student Id and gpa and name in a linked list. I keep getting error messages.

Like: lab 20.cpp(43): error C2628: 'Student' followed by 'int' is illegal (did you forget a ';'?)
(43): error C3874: return type of 'main' should be 'int' instead of 'Student'
(71): error C2664: 'Student::Student(const Student &)' : cannot convert parameter 1 from 'int' to 'const Student &'
Reason: cannot convert from 'int' to 'const Student'
No constructor could take the source type, or constructor overload resolution was ambiguous

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
using namespace std;
struct Student {
string name;
double gpa;

[Code] ....

View 1 Replies View Related

C++ :: List Class With Student Type?

Jul 3, 2013

I am trying to use a class Student and declare it as a list type. I can pushback but without changing the List.h or Node.h how can I print the data in list2?

Node.h
#ifndef NODE_H
#defineNODE_H
#include <string>

[Code].....

View 6 Replies View Related

C/C++ :: Writing And Sorting Student Report

Sep 27, 2014

I'm trying to write a table (2D array) with a string of random chars in one row for the student names, six other rows for the project numbers and random numbers for the grades.Then calculate the averages of grades per student and per project, add them as the last row and the last column. And write a menu of 4 options:

1- sort per student names (alphabetical order)
2- sort per student grades (in increasing order)
3- sort per project grades ( in increasing order)
4- exit

The program must continue execution after displaying any report, need to use an infinite loop, it exits only if the chosen 'exit'.

Here's what I have:

#include <ctime>
#include <string>
#include <iomanip>
#include <iostream>
using namespace std;
ints=12,p=6;
stringnames[20];

[Code] ....

And then, I need to show interactively the same report with all types of sorting:

sort table by any row, (user enters the row number)

sort table by any column. (user enters the col number)

sort table sorted by student names as well.

View 12 Replies View Related

C :: Student Record System / File Handling

Feb 25, 2013

Code:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
}

[code]....

I dont know how to modify the previous record that i have done in the Add Student function. i searched from different sites and got this code for modifying a record in a text file. But, i cant figure it out why its not working.

View 2 Replies View Related

C :: Linked List To Gather Student Info

Dec 17, 2014

The programme has to be a linked list to gather student info, (ie name, lastname, student no, and three grade); the first and last name must use malloc correctly, there must be an insert and delete function and a printfunction. and they must print out in alphabetical order.

Code:
#include #include #include struct student{
char *lastName;
char *firstName;
char dob[20];
char sID[20];
float grade;

[code] .....

View 7 Replies View Related

C++ :: Student Database - Ifstream And Ofstream Operators

Apr 23, 2013

I've been working on a student data base that reads in the students name, birth date, social security, and department name (or major). I have all these items in the header files respectively; nameType, dateType, personType, and studentType.

I am now to create another header file called HWONEHEADER that contains the functions showMenu, loadStudent, insertStudent, searchByName, and SaveStudents. This is how far ive gotten

#ifndef HW
#define HW
#include <iostream>
#include <fstream>
#include <iomanip>
#include "studentType.h"

[Code] .....

Here is the cpp file i have.

int main() {
studentType department;
cin>>department;
cout<<department;

[Code] .....

I need with the HWONEHEADER using the ifstream and ofstream operators to load all the students information into a file called student.dat I'am extremely confused because i can't find anything in my textbook about using ifstream and ofstream operators.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved