Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,576 members, 7,816,421 topics. Date: Friday, 03 May 2024 at 11:00 AM

Pls! Help With This C++ Program - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Pls! Help With This C++ Program (1451 Views)

Help! Im Stuck With This C# Program / Please Programmars Help Me Out With This C# Program! I Have Test Tommorrow!!!!! / A Simple C++ Program That Evaluates A Simple And Compound Interest (2) (3) (4)

(1) (Reply) (Go Down)

Pls! Help With This C++ Program by EXICON(m): 8:55am On Dec 08, 2010
Grt day 2 u all fellow programmers. Pls i need a C++ expert 2 help write d source for a program to accept n students and grade them according to the following grading format:
100-70---A
69-60----B
59-50----C
49-45----D
44-40----E
39-0-----F.
Tanx very much.
Re: Pls! Help With This C++ Program by Nobody: 11:49am On Dec 08, 2010
Seriously bro? You do not need a C++ expert to write that for you; any _idiot with even the most basic knowledge of C++ can write that. In fact, a lot of non-C++ programmers on naira land can write that. All they need do is familiarize themselves with C++'s condition statements  and standard output functions. Haba, are you this lazy?

I consider myself a passionate, albeit average, C++ programmer, and on reading the title of your thread, I became animated with joy because of the prospect of being challenged with a worthy and significant problem. And you came up with this rubbish embarassed.

To add insult to injury, you started the silly post with: "Grt day 2 u all fellow programmers." Abeg, vamoose. Who be your fellow programmer? Who give your monkey banana?
Re: Pls! Help With This C++ Program by mikkytrio(m): 2:12pm On Dec 08, 2010
@omo_to_dun
People like you are the ones that just really run their mouths and know nothing in their heads. The thought is that we as programmers are here to aid people learning. So if you feel you are that special, then help him out, that is why "he" I am guessing took you as an expert and came for advice and all you did was make him look stupid and dull.
Re: Pls! Help With This C++ Program by GoodMuyis(m): 6:48pm On Dec 08, 2010
@EXICON

Am alittle bit know how to tackle your Problem I will reply to this post latter with the source code and the Bigger Boys will help me make correction to the source code, but to start i will give a scetch out

And if i did not reply Writye on my FaceBook Wall

http://www.facebook.com/goodmuyis
Re: Pls! Help With This C++ Program by GoodMuyis(m): 6:59pm On Dec 08, 2010
And mind you am not a good programmer am still learning
also i dont how to apply OOP to your question i will only use Structures for it

Regards
Re: Pls! Help With This C++ Program by Nobody: 8:07pm On Dec 08, 2010
mikkytrio:

@omo_to_dun
People like you are the ones that just really run their mouths and know nothing in their heads. The thought is that we as programmers are here to aid people learning. So if you feel you are that special, then help him out, that is why "he" I am guessing took you as an expert and came for advice and all you did was make him look silly and dull.

You sir, are a complete _idiot. I am not one of those people who always like to solve other programmers' problems by immediately handing out the code to a problem. I try to offer assistance by conversing with them and, possibly, offering pseudocode. However, if the person is not a programmer, then I will gladly give him or her the code if I can.

The OP claimed to be a programmer and he could not code that simple problem. If I gave him the code, how would he learn? _Idiot.
Re: Pls! Help With This C++ Program by solomon201(m): 11:31pm On Dec 08, 2010
@omo_to_dun
take it easy on the guy. Its obvious he is not even a programmer. I guess he is a CSC student tryin to get an assignment done. Even @ dat d guy is DULL d question is too simple. Pls guyz dnt jst give out d code it wount help him. I wonder if he can write Hello world!
Re: Pls! Help With This C++ Program by mikkytrio(m): 11:45pm On Dec 08, 2010
omgpeople can be dead dumb!!!
Re: Pls! Help With This C++ Program by mexzony: 3:13pm On Dec 09, 2010
@ omo to dun
i think you should have asked him first if he knew the basics of the C++ language first or if he was not a programmer at all.then you could then know what to do next.i understand that you want him to learn because personally speaking when i read his post i said to my self,this is very very easy.but than that still does not mean you should have abused him the way you did.come on my guy you went a bit too far i must say.programmers should help even if it is the smallest and simplest problem.i mean thats the whole essence of programming which is to solve problems.look if you can write the source do it for him.take care LOL


@ EXICON
seriously this should not be a problem if you really studied and practise the basics of C++ that is if you are a programmer.but all the same its okay to ask.but i advice you take time and study the language.take care
Re: Pls! Help With This C++ Program by okeyxyz(m): 2:07am On Dec 11, 2010
@EXICON,
can you post the code you have written so far on this problem of yours, at least it will show you'd even made attempt on your own. then maybe somebody will help you out where u r stuck.
Re: Pls! Help With This C++ Program by GoodMuyis(m): 8:11am On Dec 11, 2010
I support what you Big friends are saying but i remember that i start learning C++ by looking other source code that is well commented and that gives me more idea of what is going on i the program.

so pls am begging lhelp this guy out with his home work

Thats
Re: Pls! Help With This C++ Program by Nobody: 10:43am On Dec 11, 2010
@OP

Okay, I admit that I was harsh in my first reply; however, I remain unapologetic because I believe I did the right thing, albeit too vehemently and passionately.

If you still need the code, I am ready to guide you through it. I just want to be sure that you really need it, and that you're willing to learn.
Re: Pls! Help With This C++ Program by mikkytrio(m): 1:23pm On Dec 12, 2010
#include <iostream>
#include <string>

using namespace std;

class mains
{
private:
int grade;
int amountOfStudents;
void getGrade();
string setgrade(float score);

public:
void getAmt();
mains()
{
grade = 0;
amountOfStudents = 20;//default amount of students

}
};

void mains::getAmt()
{
int amt = 0;
cout<<"Enter amount of student in the class: ";
cin>>amt;
//set the amount of students to the entered value
amountOfStudents = amt;
getGrade();
}

void mains::getGrade()
{
int limit = amountOfStudents;
int counter = 0;
float score = 0.0;

for(counter=0; counter<limit; counter++)
{
cout<<"Enter Student "<<counter+1<<"'s score: ";
cin>>score;
cout<<"Student's score: "<<setgrade(score);
cout<<endl;
}
}

string mains::setgrade(float score)
{


if(score <= 100.0 && score >=70.0)
{
return "A";
}

else
{
if(score <=69.9 && score >=60.0)
{
return "B";
}

else
{
if(score <= 59.9 && score >=50.0)
{
return "C";
}
else
{
if(score <=49.9 && score >=45.0)
{
return "grin";
}
else
{
if(score <=44.9 && score >=40.0)
{
return "E";
}
else
{
if(score <= 39.9 && score>=0.0)
{
return "F";
}
else
{
return "Sorry score out of range";
}
}
}
}
}
}

}

int main()
{

//create object for class mains
mains stud;
//get the amount of students in the class
stud.getAmt();
return 0;
}
Re: Pls! Help With This C++ Program by Nobody: 9:50pm On Dec 12, 2010
@mikkytrio  u got me tripping i was trying to attempt the question cos am learning too when i saw your work , but i  have a question which book is better in learning the basics? i learnt oop in my yr2 but never had a full knowledge of the course and i believe c++ is all about oop.
I wrote some programs but never went pass the normal calculate,multiply and divide stage .despite the fact that i laid my hands on some conversion exercise.
    Am presently using deitel/dietel book(C++ how to program), is that the best book for me now? cos there are some topics that gets me confusing, i really want kind hearted programmers to recommmend any book they used when they were learning.would be very greatful
Re: Pls! Help With This C++ Program by mikkytrio(m): 12:18pm On Dec 13, 2010
www.cplusplus.com/files/tutorial.pdf
that is not a bad start
Re: Pls! Help With This C++ Program by naijaswag1: 3:48pm On Dec 13, 2010
omo_to_dun:

Seriously bro? You do not need a C++ expert to write that for you; any _idiot with even the most basic knowledge of C++ can write that. In fact, a lot of non-C++ programmers on naira land can write that. All they need do is familiarize themselves with C++'s condition statements  and standard output functions. Haba, are you this lazy?

I consider myself a passionate, albeit average, C++ programmer, and on reading the title of your thread, I became animated with joy because of the prospect of being challenged with a worthy and significant problem. And you came up with this rubbish embarassed.

To add insult to injury, you started the silly post with: "Grt day 2 u all fellow programmers." Abeg, vamoose. Who be your fellow programmer? Who give your monkey banana?




I am not aware of any programming language that was invented by a Nigerian.I am not aware of any Nigerian if only there exist that has made any useful contribution to the development of any of the over 100 programming languages in existence.Why I am saying this,the type of attitude displayed in the quote above is characteristics of many client programmers in Nigeria.From the above,you are just one of those monger park,anu monkey pompous folks whose ability to put together one or two things together swells their head.Someone asks for a some help and you are heaping insults on that person.What do you know? You make use of a language invented by a human being like yourself,you have not even contributed to the core or secondary development of C++ and you are here feeling like one bush man who probably never thought that he could learn how to write codes.Java guys wouldn't do such thing.That you able to write a software is nothing compared to those who dish out the libraries and release updates every second.It is young people like you that are working at FB and Pal Alto and Microsoft and building Eclipse and all those,C++ IDE and all those tools that you use,even the web browser that you are using to post rubbish were made by folks like you and you are here feeling that Yar'adua because you can write one vain program that you cannot not even explain in full details.I doubt that you even make up to 10million per annum.anu ofia.
Re: Pls! Help With This C++ Program by Nobody: 7:36pm On Dec 13, 2010
@naija_swag
easy man easy , i feel you ,what omo-to-dun sould have done was to ask if the op had written anyting, and not come here and spill such venom. i believe he will correct himself next time .
@ mikkytrio
thks for the link was helpful i appreciate.
Re: Pls! Help With This C++ Program by mikkytrio(m): 7:42pm On Dec 13, 2010
no problem man at least am sure you got my back tomorrow.
Re: Pls! Help With This C++ Program by beetrr: 5:51am On Dec 14, 2010
must you run your moth simply because you want to help solve a problem,  its so sad sad 
even so pathetic dat you cuoldnt solve it @ d end of it all, u know yourself, thmbs up mikkytrio
Re: Pls! Help With This C++ Program by Nobody: 8:42am On Dec 14, 2010
naija_swag:

I am not aware of any programming language that was invented by a Nigerian.I am not aware of any Nigerian if only there exist that has made any useful contribution to the development of any of the over 100 programming languages in existence.Why I am saying this,the type of attitude displayed in the quote above is characteristics of many client programmers in Nigeria.From the above,you are just one of those monger park,anu monkey pompous folks whose ability to put together one or two things together swells their head.Someone asks for a some help and you are heaping insults on that person.What do you know? You make use of a language invented by a human being like yourself,you have not even contributed to the core or secondary development of C++ and you are here feeling like one bush man who probably never thought that he could learn how to write codes.Java guys wouldn't do such thing.That you able to write a software is nothing compared to those who dish out the libraries and release updates every second.It is young people like you that are working at FB and Pal Alto and Microsoft and building Eclipse and all those,C++ IDE and all those tools that you use,even the web browser that you are using to post rubbish were made by folks like you and you are here feeling that Yar'adua because you can write one vain program that you cannot not even explain in full details.I doubt that you even make up to 10million per annum.anu ofia.

The points you brought are totally inconsequential and unhelpful toward this particular discourse. I will say this once again: above all else, my wish is that other programmers understand how to use a language, be it from tutorials on sites or from fellow programmers. However, one should not hand over trivial code to anyone. What if that was his assignment? Then, consequently, he will have learned absolutely nothing.

What bothers me most is that the OP thinks that he needs a C++ expert to churn the needed snippet of code. It is not your fault, the Nigerian system of education has failed you. Do you think your professor would hand you such a code or he or she would teach you how to fish, instead of giving you a fish.

As for those who opined that I should have instead ask whether the OP can program, I would suggest that you learn how to read because the OP implicitly stated that he was a programmer by using the phrase, ", my fellow programmers." Ergo, he is a programmer. Were he to be asking about programming idioms in C++ or some otherwise esoteric or nontrivial aspect of the language, then that is another case. What the OP needs is a tutorial not code.

(1) (Reply)

Stellar.org’s Nigerian Coming Could Kickstart A Payments Revolution / Programming Section Heavy-weights, Come Hither! / Looking For Developers

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 46
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.