masters? please help me about student information

this is the output:

Ex.
enter no. of students:3 //unlimited number of students but i exampled 3 only

enter student name:ben //if i input 3, name and units will show thrice
enter student units:200
enter student name:drew
enter student units:200
enter student name:lesh
enter student units:200 //note:maximum 200 units

student name units tuition
ben 18 3600 //units*200
drew 20 4000
lesh 10 2000


(guys could u give me the code please?) thank u
Last edited on
any one could help me? :(
Could you make your question more clear? Are you wanting someone to write you the code that will output "enter no. of students: " then read an integer input. Then output "enter student name: " and "enter student units: " that many times?
Yes,please make the question more clear.As far as I have understood,
Maybe you mean.
Input no of students.
Suppose you enter 10.
So,then You'll be asked to enter the name and units 10 times?.
and display the results in a listed format.
Are you allowed to use structures?
Would make it much easier.

@r. Abhinav yes sir, after inputing the number of student.names and units

SN units tuition
ben 18 3600
drew 20 4000
lesh 10 2000

@drunken meerkat sorry sir im newbie in this cite
Last edited on
@r.Abhinav BIG thanks for reply
@drunken meerkat BIG thanks for reply
#include <iostream>
#include <string>
using namespace std;
int main (){

int stdn=0, stdu=0, tuition[99], unit[99];
string input[99];
cout<<"Enter number of students: ";
cin>>stdn;
for (int r=0; r<stdn; r++){
cout<<"Enter student "<<r+1<<" "<<"Name: ";
cin>>input[r];
cout<<"Enter student "<<r+1<<" "<<"Units: ";
cin>>stdu;
tuition[r]=stdu*200;
unit[r]=stdu;
}

cout<<endl;
cout<<"********Ouput Display*******"<<endl<<endl;
for (int n=0; n<1; n++){
cout<<"Student Name\t";
cout<<"Units\t";
cout<<"Tuition"<<endl;
}
for (int y=0; y<stdn; y++){
cout<<input[y]<<"\t\t"<<unit[y]<<"\t"<<tuition[y]<<endl;
}
return 0;
}


thats my code check it
hey,Have you learnt structures yet?Please reply.Because I don't think it can be done without using structures.
especially the name part.
storing names need an array.and we would need to make an array of the names,which i don't have knowledge of.lol
Last edited on
string input[99];..what do you mean by string?
hehe i using visual studio 6.0 not turbo c
oh ,Damn.lol.I use turbo C++.
I was nearly about to send you the proper code when I read your post.Sorry for wasting your time.
hahaha its ok thank u :)
add me in face book Vhon Creencia
ill ask help if indeed
Last edited on
Topic archived. No new replies allowed.