hi ..I have made this program... the user needs to enter the name of the student and the registeration number...and his marks get stored..
after the data of the first student get feeded...the control jumps directly to the registeration number part...without actually making the user enter the name of the second student..the code is given below..can anyone spot the error.
#include<iostream>
#include<string.h>
using namespace std;
the user needs to enter the name of the student and the registeration number...and his marks get stored..
after the data of the first student get feeded...the control jumps directly to the registeration number part...without actually making the user enter the name of the second student
That's because you call:
get_info()
get_marks()
display()
for each user.
Also, in get_marks(), you have:
percent = float(((total*100)/500));
Do you realise this performs integer multiplication and division yielding a truncated result?