So that I can display based on the 8 different choices.
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
using namespace std;
Type: Posts; User: Sedvan
So that I can display based on the 8 different choices.
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
using namespace std;
with int or float?
I've written a program that sorts a list of 188 movies based on, title, year, media type and length. I am having problems with the creation of a menu though. It seems I cannot create a
working...
This code is meant to sort a list of movies from a file based on title, year, media and length. The format for the movie file is:
You've Got Mail,1998,109,DVD
Birthday Girl,2002,129,VHS
Get...
Good point..i removed one. Didn't really seem to be the root of the problem though.
What exactly is making this program run without outputting if the answer is correct or incorrect after every input.
int main()
{
srand( (unsigned int)time(NULL) );
int num;
for (int i = 0; i < 1000; i++)
{
num = rand();
if (i % 10 == 0)
Being confused and not listening are too very different things. You're wiki is helpful. But I can't just read some instructions and be expected to grasp the concept of how to neatly organize...
Well thanks anyway. I just wish you'd realize that I don't have the knowledge you do so I can't know what you mean by, "That's poorly indented". I can only take stabs in the dark and read the link...
I think this is neater than before.
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
srand((unsigned)time(0));
int answer,i;
You want me to indent with 4 or 8?
Okay so now I did spaces. Whatya think?
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
srand((unsigned)time(0));
int answer,i;
does that mean I only hit it once, because everything just lines up and the eye won't see the difference in the statements...?
Seems a little irrelevant to me but then again i'm used to looking at my own code and I see differently than you might.
#include <iostream>
#include <ctime>
#include <cstdlib>
using...
Well You guys are telling me to get rid of all my spaces/tabs, and I really don't understand how thats going to solve my problem. It's probably more of a style thing so that it's easier for you to...
I'm pretty ignorant.
I'm more concerned with repetition of the code and it outputting whether or not it's right. I am able to make it repeat, but it won't output the outcome anymore.
{
for (int j = 0; j < 10;...
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
srand((unsigned)time(0));
int answer,i;
Okay so I've been working on it, and I removed void like you wanted me to..hasn't really changed the program much..I really need a pointer on how to fix my loop..it works fine until i try to make it...
It atleast runs the questions 10 times. But it doesn't grade them after each time. hrm..any ideas?
#include <iostream>
#include <ctime>
#include <conio.h>
#include <cstdlib>
#include...
If the while loop repeats code until a condition is met then You can cause that loop that causes the answer to be correct or incorrect to repeat itself?
if i have this, could i put the for loop inside another loop and so that the student can take a little pop quiz and see the percent wrong?
#include <iostream>
#include <ctime>
#include...
Wow...that clears things up a bit...It seems like I was putting to many if and else statements in there..it works now :P
Alright, Now the purpose of the program is to generate two random numbers both from the pool of 1-50 and have them come in the form of the question asking the user to input the sum. They get two...