Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~11.7K People Reached
Favorite Forums
Favorite Tags
Member Avatar for fugnut

I would like to have the user enter ctrl-z to end the program...can someone tell me how to insert this into the following program? [CODE]//Program to calculate greatest common denominator of two integers #include <iostream> using namespace std; int calcGCD(int, int); int main() { int a, b, res; cout <<"This …

Member Avatar for mohammad reza_1
0
7K
Member Avatar for fugnut

Hello all, I am working with a program to calculate the days in a given month. We are to use functions and bool. I have the below code, which worked until I tried to create the function. I continue to get an error about "numberOfDays" not being initialized however if …

Member Avatar for deceptikon
0
3K
Member Avatar for fugnut

Hello all, I am at the beginning of a new program working with structs and I am getting an error I cannot figure out. My code so far is [CODE]//PJ901 PAtrick Nealey //Acme Payroll Program #include <iostream> #include <fstream> #include <iomanip> #include <cstring> // for _strcmp using namespace std; const …

Member Avatar for Fbody
0
126
Member Avatar for fugnut

What stupid basic thing am I missing? we are to read in from a file that contains 10 lines.....name, age, etc....I can read in the file ok and print out the first line....I am having problems printing subsequent lines....HELP!! lol [CODE]//Acme Personel Report //by PAtrick Nealey #include <iostream> #include <iomanip> …

Member Avatar for fugnut
0
178
Member Avatar for fugnut

I am writing a hangman program for class and so far I am able to read in and randomly pick a word from the file. The problem I am facing is counting the number of letters in the chosen word. Once I get that I can work on the rest …

Member Avatar for jonsca
0
186
Member Avatar for fugnut

what AmI missing? I am simply trying to read in an array from a txt file and count the words. What am I doing wrong....here is the function[CODE]int countwords(ifstream& infile, int wordcount[MAX_WORDS]) { int count = 0; for( int i=0; i < MAX_WORDS && infile; i++) { infile>>wordcount[i]; count++; } …

Member Avatar for Ancient Dragon
0
81
Member Avatar for fugnut

My first attempt at 2-dimensional arrays is not working out so well. We are to simply initialize an array and print out the results. My problem is that the data contains text and numbers.....column header is car color, row header is car make. I am getting error for lines 19 …

Member Avatar for u8sand
0
177
Member Avatar for fugnut

I have been tasked with writing a program that will read in from 2 files and determine a premium rate depending on age. I have written part of the program and I am simply trying to make sure that what I am reading in is correct. The input file has …

Member Avatar for WaltP
0
82
Member Avatar for fugnut

As part of an assignment, I am to create a function to complete the program....I am very new to arrays and would like a little help, code as follows [CODE]// NAME: // ASSIGNMENT: pj70101 - ComputeAverage Function // COURSE: #include <iostream> #include <iomanip> using namespace std; //========================================================= // put your …

Member Avatar for jonsca
0
110
Member Avatar for fugnut

I have a switch function in a program that needs a little help. The switch function is as follows [CODE]ostream& displayShapes( ostream& outfile, Shapes ashape) { switch( ashape ) { case Triangle: outfile<< "Triangle" ; break; case Circle: outfile << "Circle" ; break; case Rectangle: outfile << "Rectangle" ; break; …

Member Avatar for fugnut
0
94
Member Avatar for fugnut

Hello all, I am writing a program that reads in from a file and depending on the first character read in, it will then read in other data and make calculations. The file has data similar to "C 10 or T 10 20" The letter being the shape and the …

Member Avatar for MyrtleTurtle
0
146
Member Avatar for fugnut

I have to write a program that reads in from a .txt file similar to 12345 Il 4350 (sales number, state abbreviation, amount) for the most part I dont have an issue with this, however I have to read in the State abbreviation as separate characters and ultimately alphabetize them. …

Member Avatar for fugnut
0
83
Member Avatar for fugnut

Hello all, I have a project in which I need to open an external file which contains to columns of numbers ie: 1000 1000 1111 500 1500 1000 2000 900 2222 2000 2500 2000 3000 1500 3333 2000 3500 2000 4000 600 4444 2500 4500 2000 5000 2500 5500 2222 …

Member Avatar for mitrmkar
0
113
Member Avatar for fugnut

Hello again all, I have a project in which I need to read in a text file: 1000 1000 1111 500 1500 1000 2000 900 2222 2000 2500 2000 3000 1500 3333 2000 3500 2000 4000 600 4444 2500 4500 2000 5000 2500 5500 2222 5555 2000 6000 1999 this …

Member Avatar for WaltP
0
92
Member Avatar for fugnut

I would like the output of the following program to show the first integer without decimals and the rest will have 4 places..the way it is written now all outputs show as 1.0000 (or something similar) code is as follows [CODE]//Square root and cube root calculator #include <iostream> #include <iomanip> …

Member Avatar for NathanOliver
0
163
Member Avatar for fugnut

Hello all, I am a major noob a C++ and need some help with managing case. we are to write program that asks the user to enter a temperature and a single letter, F for Farenheit or C for Celsius. The program should manage the upper or lower case input …

Member Avatar for fugnut
0
166