frogboy77 73 Posting Pro in Training

I gave you the answer dude.

frogboy77 73 Posting Pro in Training

What are 5 and 6 supposed to compute?
5) maybe %5
6) maybe /5

frogboy77 73 Posting Pro in Training
frogboy77 73 Posting Pro in Training

Point 2) from the OP is what i was looking for. (i.e the very detailed part)

frogboy77 73 Posting Pro in Training

Thread bump

Same question for windows

frogboy77 73 Posting Pro in Training

Break is used for stopping a loop. You are not using a loop.

frogboy77 73 Posting Pro in Training

if (ope == '+')

frogboy77 73 Posting Pro in Training

ope should be a char

frogboy77 73 Posting Pro in Training

What exactly is it that you are thankful for? (Genuine question)

frogboy77 73 Posting Pro in Training

so big me up

frogboy77 73 Posting Pro in Training

Without the braces the loop only executes the one command after then exits after it has finished, then you output the final value of k.

frogboy77 73 Posting Pro in Training

1) Purchase a computer (guess this is covered)
2) Attain a compiler
3) Write the code
4) Compile and run
5) Job done

frogboy77 73 Posting Pro in Training

NO they are vegetables pretending to be fruit.

frogboy77 73 Posting Pro in Training

{} braces around your loop

frogboy77 73 Posting Pro in Training

Oh I thought you could enter like 5 integers at once almost like you can with characters into an array.

No if you want the individual digits in an array you will have to find a way to separate them. (there are a number of threads on this site with ideas about how to achieve this)

frogboy77 73 Posting Pro in Training

for the first question google SRAND
line 42 you create an array of ints then on line 45 you attempt to read a value to this array without specifying which location in the array you want to store it. I think you want to take in the digits of the guess into the array so you can check them one by one but this is not what you are doing.

frogboy77 73 Posting Pro in Training

Is there a reason you are not permitted to use strings and a simple loop?

frogboy77 73 Posting Pro in Training

Given the fact that of all the code posted on this thread (and there is more than enough) none of it is yours then an accusation of lack of effort i think is more than justified.

Fbody commented: Was this really necessary? -3
frogboy77 73 Posting Pro in Training

ask for input
store values
send information to average function
return average
print average
DONE

frogboy77 73 Posting Pro in Training

Frogboy,
You pretty much got what i needed bang on, But hahaa,
Dude you did all the work for me lol >"<

VERY little work involved.

frogboy77 73 Posting Pro in Training

I see no mention in the original post concerning arrays.
Again with no error checking.
Maybe i'm reading this all wrong but what's wrong with

#include <iostream>

using namespace std;

int main()
{
    int quiznum;
    double total=0,result,average;
    cout<<"Enter amount of quizes: ";
    cin>>quiznum;
    
    for(int i=1;i<=quiznum;++i)
    {
            cout<<"Enter result: ";
            cin>>result;
            total+=result;
    }
    
    average=total/quiznum;
    
    cout<<"\nThe average is "<<average<<"\n";
    if(average>=75) cout<<"Pass\n";
    else cout<<"Fail\n";
    
    return 0;
}
frogboy77 73 Posting Pro in Training

Why do you have 2 loops when you just add to sum after line 16.
This can be easily done without the need for arrays.

frogboy77 73 Posting Pro in Training

Tradition.

frogboy77 73 Posting Pro in Training

The only reason i have came across for a function with nothing sent to it and no return is output to the console.
Google cout.

frogboy77 73 Posting Pro in Training

You need to find out how to keep the console window open. see here to begin with
P.S you have no contingency for the numbers being the same.

frogboy77 73 Posting Pro in Training

For b) what about

((1 + (rand() % 5)) * 2)+1;
frogboy77 73 Posting Pro in Training

In what way?

frogboy77 73 Posting Pro in Training

What error are you getting?

frogboy77 73 Posting Pro in Training

it was a little too advanced for the class I'm in

I doubt it. I know nothing of classes or pointers so your code is beyond me.

frogboy77 73 Posting Pro in Training

Sorry it was pretty late. The code was not intended to be handed in as is. The point i was trying to convey was that there seemed to be a lot of unnecessary work being done. Basically you only need to check the first character of the string against the last, then the second against the second last etc.. until you reach the middle.

frogboy77 73 Posting Pro in Training

Of course they will probably work out a solution, but what will happen if the U.S. government shuts down?

Probably a lot of flag waving.:)

frogboy77 73 Posting Pro in Training
#include <iostream>
#include <string>

using namespace std;

bool is_pal(string a)
{
     int b=a.length();
     for(int i=0;i<(b/2);++i)
             if(a[i]!=a[b-i-1])return false;
     return true;
}

int main()
{
    string s;
    cout<<"Please enter a string:\n";
    cin>>s;
    if(is_pal(s)) cout<<"This is a palindrome.\n";
    else cout<<"This is not a palindrome.\n";
    
    return 0;
}
frogboy77 73 Posting Pro in Training

Why the { on line 27?
What if n%10=1? i.e n=11 or 21?

EDIT
Beat me to that Nick:)
I have also been led to believe goto is BAD. A while or do while loop may be better.

frogboy77 73 Posting Pro in Training

You failed yet?

frogboy77 73 Posting Pro in Training

And your question is?

frogboy77 73 Posting Pro in Training

I think this is what you need. here

frogboy77 73 Posting Pro in Training

line 21 change poolsize to volume

Aghtar commented: ty +1
frogboy77 73 Posting Pro in Training

@ mzimmers
nothing (but it's just a guess).

frogboy77 73 Posting Pro in Training

I think he is referring to this.

frogboy77 73 Posting Pro in Training

// system("pause"); - don't use this - not portable.

Is long long portable?

frogboy77 73 Posting Pro in Training

No, you are using double for a larger range of values. In this instance it is no more precise.

frogboy77 73 Posting Pro in Training

no

frogboy77 73 Posting Pro in Training

If you're like me and enjoy Steam's service (not having to mess with DVDs and CDs),

http://www.bbc.co.uk/news/technology-15690187

frogboy77 73 Posting Pro in Training

ok run your code and input 100.
Unless you are using vectors or strings to do this there has to be a defined limit.
c++ not python or ruby.

frogboy77 73 Posting Pro in Training

what about

#include <iostream>

using namespace std;

int fact(int a);

int main()
{
    int num;
    cout<<"Input number.\n";
    cin>>num;
    cout<<fact(num)<<endl;
    
    return 0;
}

int fact(int a)
{
    if(a==1)return 1;
    else return a*fact(a-1);
}
frogboy77 73 Posting Pro in Training

why use double for a factorial problem?

frogboy77 73 Posting Pro in Training

And for the record i have taken Intro to CS, i understand most of the codding

I'm guessing this is Codding Studies. I am however curious if this is the successful harvesting of Pacific or Atlantic fish.;)

frogboy77 73 Posting Pro in Training

Does "friend" mean teacher?

frogboy77 73 Posting Pro in Training

You have far too much time on your hands.

frogboy77 73 Posting Pro in Training

Sometimes?