I love this little thing, and it makes a lot of sense.

if ( $clue eq 'none' ) { read ( handbook | faq | man | others ) && search ( whatis | lists | forum | google ) } if ( $answer == 0 ) { post->question }

Recommended Answers

All 11 Replies

I cannot get the address line on internet explorer. Using Juno have to go through search. I am also using hotmail. it comes up in Spanish. When I click on Coreo it everts to English. It happeened suddenly Canot pinpoint anything.

I am using Windows 98 secnd edition my microp[rocessoe is MMx233

Where di I look for areply

Thank you

Do you have a compiled version of that code? :mrgreen:

(I'm kidding... No really I'm kidding...)

heh heh......

Rather eliminates the need for a forum, doesn't it?

nah it doesnt eliminate the need for forums jst for answering the same questions over and over and over. and for answering questions that could have been found really easily with a quick google search ;)

It's actually quite remarkable just how many people, quite competent in their everyday computer usage, just don't have a high enough level of literacy to be able to cope with formulating search criteria to use.

Design and write a C++ program for the problem given below. Apply the rules of good programming style by making your program modular, and using parameters and local variables in subprograms or functions. Add comments where necessary for each function. Use meaningful variable names. Your program should be user friendly.

A grade 12 class wrote a test in information technology which counted 50 marks. Their teacher wants to find out how many pupils got a mark between 0 and 49 percent (i.e. how many pupils failed), and how many got a mark of 50 percent and more (i.e. how many pupils passed the test). He also wants to determine the average mark of those who failed and the average mark of those who passed. Your task is to write a C++ program to do this. The marks should be entered until -999 is typed in and at the end the two totals calculated as well as the two averages have to displayed.
Your program should make use of the following 3 functions to solve the problem:

readInput( ): In this function, the end-user(teacher) should be prompted for a mark to be entered. After the mark has been captured it should be send back to the calling function, namely main( )

calculateTotals( ): Calculates the totals up to that point. In this function the mark that has just been read in, must be investigated to see which totals should be updated. It will be necessary to update two totals every time: One (1)should be added to the number of pupils in the specific group, and the mark should be added to the total of marks in that group (because later you have to calculate the average). You will need one or more if statements

showResults( ): displays the number of pupils in each group as well as the average mark for each group. However if the number of pupils in the group is zero, the average should not be calculated and displayed

Design and write a C++ program for the problem given below. Apply the rules of good programming style by making your program modular, and using parameters and local variables in subprograms or functions. Add comments where necessary for each function. Use meaningful variable names. Your program should be user friendly.

A grade 12 class wrote a test in information technology which counted 50 marks. Their teacher wants to find out how many pupils got a mark between 0 and 49 percent (i.e. how many pupils failed), and how many got a mark of 50 percent and more (i.e. how many pupils passed the test). He also wants to determine the average mark of those who failed and the average mark of those who passed. Your task is to write a C++ program to do this. The marks should be entered until -999 is typed in and at the end the two totals calculated as well as the two averages have to displayed.
Your program should make use of the following 3 functions to solve the problem:

readInput( ): In this function, the end-user(teacher) should be prompted for a mark to be entered. After the mark has been captured it should be send back to the calling function, namely main( )

calculateTotals( ): Calculates the totals up to that point. In this function the mark that has just been read in, must be investigated to see which totals should be updated. It will be necessary to update two totals every time: One (1)should be added to the number of pupils in the specific group, and the mark should be added to the total of marks in that group (because later you have to calculate the average). You will need one or more if statements

showResults( ): displays the number of pupils in each group as well as the average mark for each group. However if the number of pupils in the group is zero, the average should not be calculated and displayed

Um... does this post mean that $clue eq 'none' ? ;)

We don't do homework here. If you'd like some help on some type of assignment, post what you've done in the programming forum, and then ask us what you need help with.

can somebody please help me or just give some clue on how to tackle the problem i posted

First of all, this is the wrong place to post questions. Second of all, we don't help with homework problems unless you show some effort on your part. Check out the C++ forum. Post your question there. Show us what you've done on it so far and where you're stuck. And we'll be more than happy to help you. Just not here in this forum/thread.

thanx for the tip cookie moderator below is what ihave manage to do don't mind my logic the thing is that i want to know how to link the functions to one another I will be very greatful if you can help me

#include<iostream>

using namespace std;

int readinput();
int calculatetotals(int);
 int showresults(int );
 main()
{

     readinput();






return  0;

}

int readinput()

{
     int mark; 

    cout<<"please enter marks\n:";
    cin>>mark;

    calculatetotals(mark);


return mark;
}

int calculatetotals(int a)
{
    int score=a,
        average_for_failers=0 ,
        average_for_passers=0,
        passers=0,
        failers=0;



    if(score<=0 && score>=49)

         failers +=1;
         average_for_failers=score;


     if(score<=0 && score>=49)

        passers +=1;
        average_for_passers+=score;


     cout<<"The number of pupils who failed"<<failers<<endl;
     cout<<"The average of student who failed"<<average_for_failers<<endl;

     cout<<"The number of pupils who passed"<<passers<<endl;
     cout<<"The average of student who passed"<<average_for_passers<<endl;

         return score;
}
 /*int showresults(int h)

 {
     int fail=h,
         failures,fail_average,passer,passers_average;

     cout<<"The number of pupils who failed"<<failures;
     cout<<"The average of student who faile"<<fail_average;

     cout<<"The number of pupils who passed"<<passer;
     cout<<"The average of student who passed"<<passers_average;


     return fail;
 }
 */

hlokzilla, you've been asked a couple of times now to post your problem in the C++ forum section:

http://www.daniweb.com/techtalkforums/forum8.html

This forum section here is for general discussion about everyday (read: "Real Life") discussion and socializing!

Please post a topic in the appropriate section for your specific technical problem. Copy/paste would be a wonderful friend to you right now! ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.