#include <iostream>

void main(void)
{

int= toys
toys= 62
int= dolls
dolls= 99

total= toys+dolls
}

cout <<"We have about" << toys<<dolls<< end;

This is the program I came up with so far.

Recommended Answers

All 4 Replies

Looks like you did. But that won't compile, you have no ;'s at the end of the lines, and the int variables are declared incorrectly
should be

int toys; toys = 62;

Also you need to have the last cout inside the main function, and either use the std namespace or call it as std::cout

example

using namespace std;
cout << "Hello!";

or

std::cout << "Hello!";

Other than that, what's your question?

I want to thank you for the help as I stated Iam just in the learning stages of this class so its still new but never the less interesting to me.I wasnt sure on how to get help with my program cause this site takes a little getting used to I would like to add your name to my buddy list if I can cause I know I will need more help with the class work.

Hello,

This is how the DaniWeb is supposed to work. Students, post your code, and people will come around and help you with it.

It is best not to privately ask questions of people who help you though, because they may go on vacation, or be away for a few days, and precious time could be lost. Keep the new discussions here in the open forums, so that others who may know the answer can chime in and help.

Christian

kc0arf is exactly right.

I'm a part time developer for work and a full time computer engineering student. So time is rare, and I tend to only be on these forums when I'm searching for help to my own problems. Once I find it, I post a couple responses to others that need help. Makes me feel better about recieving the help of others and using code that didn't come directly from my mind.

If you want to add me to your buddy list feel free, but keep questions in the forums. I wouldn't be opposed if you wanted to notify me when you posted, but more than likely there isn't a need for that. From the little I've been here the place seems to be active with quality posters that know their stuff.

Best of luck to you! Just remember that coding should be fun :-)

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.