User Profile
Collapse
-
Raptor
I am having problems with this program. Its in raptor. The objective is to run the program four times and record the number of hearts etc... that come up for each run. The problem is every time it runs it only adds a 1 to the first counter regardless of the number. The numbers are random 1 - 52 and do just that but will not feed down to the correct counter based on the random number produced. I am sure this is an easy fix but Im not seeing it. Please... -
Ok well I dont know what I should be setting lowest as.This may be my confusion. I am not getting what I should be setting lowest as.. I cant leave it blank..Im lost again...Sorry I am new to programming and I am sure it shows. I feel like this should be easier than what it is.Sorry -
I did Luk3r...right after i posted the code again..if you see above you will see my results.Leave a comment:
-
edit:
I saw that I did not change the first one lowest = testScr1..so i did it and now it reads the top number as being the lowest which is not the lowest number. theses are the grades it has to work with which are read from grades.txt:
71
94
62
75
82Leave a comment:
-
...Code:#include <iostream> #include <iomanip> #include <fstream> using namespace std; // Function prototype void getScore(int& score, ifstream& inFile); void calcAverage(int testScr1, int testScr2, int testScr3, int testScr4, int testcr5); int findLowest(int testScr1, int testScr2, int testScr3, int testScr4, int testScr5); int grades(int testScr1, int testScr2, int
Leave a comment:
-
...Code:#include <iostream> #include <iomanip> #include <fstream> using namespace std; // Function prototype void getScore(int& score, ifstream& inFile); void calcAverage(int testScr1, int testScr2, int testScr3, int testScr4, int testcr5); int findLowest(int testScr1, int testScr2, int testScr3, int testScr4, int testScr5); int grades(int testScr1, int testScr2, int
Leave a comment:
-
Not getting the program to read out lowest number?
...Code:#include <iostream> #include <iomanip> #include <fstream> using namespace std; // Function prototype void getScore(int& score, ifstream& inFile); void calcAverage(int s1, int s2, int s3, int s4, int s5, int lowest); int findLowest(int, int, int, int, int); int grades(int, int, int, int, int); int main() { ifstream inFile; -
This is the problem I cant figure out....void getscore() should read a score from a file and store it in reference parameter variable. This function should be called on for each of the 5 scores to be entered.Leave a comment:
-
Trying to get void getscore() to read from a file Please help!
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
// Function prototype
void getScore(int &);
void calcAverage(int , int, int, int, int);
int findLowest(int, int, int, int, int);
int grades(int, int, int, int, int);
int main()
{
ifstream grades;
grades.open("gr ades.txt");
int testScr1,... -
This is what I have. I cannot use vector or algorithm . I am stuck with probably the most basic and annoying way to alphabetize a list of names and dont know what that is at this point.Leave a comment:
-
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ifstream inputfile;
string filename;
string name;
string front, back, student;
int students = 46;
inputfile.open( "lineup.txt ");
if (!inputfile)
{
cout << "The input file did not open...Leave a comment:
-
My problem is that I dont know how to get the names to come out in alphabetical order. I only need 2 names from the list to appear on the screen. That is the first and the last. I have alot of code already and im guessing I am close but its not done yet. it does read the file and display 2 names but in no way are they in alphabetical order.Leave a comment:
-
Alphabetical Order
once all the names have been read in display which student will be at the front of the line and which student will be at the back of the line. You can assume that no two students have the same name.
No activity results to display
Show More
Leave a comment: