No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
For my project, we're supposed to read data from a text file (circlemath.txt) and the program should output data for the circle to a text file (circoutput.txt). The input file contains data specific for class Circle (x-coordinate, y-coordinate, radius, ascii character), and each line has the form (Circle1 data, operator … |
|
We have a programming project due in which we are supposed to create a boggle board. We are supposed to read in a file with the boggle dice (basically just sixteen lines of six random letters), then ask the user if they want to shake the board. If they say … |
|
I was just curious; what exactly does the line cin.ignore(INT_MAX) actually do? I was always told to use it just to keep the program screen up when inputting something. |
|
I'm trying to create 1000 random numbers using an array. I keep getting the same number everytime, though. How do I get 1000 different random numbers? Here's what I have so far: [CODE][LIST=1] [*]#include "stub.h" [*]int main() [*]{ [*] int number[1000], i; [*] int r[1000]; [*] [*] for(i=0; i<1000; i++) … |
|
If I have a 40,000 word dictionary in the file: LatinDictionary.txt How would I output that file to the screen? |
|
Is there any way to create a variable amound of endl: i.e. divide height by ten and make that many endl in a cout statement? |
|
For our class, we're supposed to simulate a moon lander program. For a given starting value for the height (200 feet above the surface), amount of fuel (100 pounds of fuel), and velocity (0 ft/sec), we're supposed to simulate a ship landing on the surface of the moon, depending on … |
|
We're supposed to write a function that calculates both the x and y coordinates of the upper left corner of the square that just contains a circle, given the x and y coordinates of the center of the circle, and the radius of the circle. Return the x and y … |
|
We're doing functions in our class, and we're supposed to write a function that displays a four-choice menu (with four character choices and a description of that choice). Then, it is supposed to output that character as a lower-case letter. If the character they enter isn't one of the choices, … |
|
For our assignment, we are supposed to use a file called functions.o. Our instructor told us it would compile with our .cpp files using the command, g++ functions.o * .cpp , but it isn't working. Is there something wrong with this command, or is there somewhere special I'm supposed to … |
|
Here's a problem we were assigned for homework. It deals with functions, and I'm not entirely sure how they work. The problem is : 1. Write a program that calls the following function. ///////////////////////////////////////////////////////////////////// // function: print_splash // // formal parameters: none // // preconditions: none // // return value: … |
|
Here's the problem: Ask the user for a floating point number until the user enters a negative number or zero. After each number the user enters print the highest and lowest number so far, and the average so far. Do not print the highest, lowest, and average when the user … |
|
I have another question for my homework. Here is the problem: Keep inputting numbers from the user until the user enters a 0. After each number, print a "running average". That is, print the average of the last three numbers entered. Be careful how you handle the first two numbers … |
|
Here's a problem we're supposed to do for my class: Input five numbers from the user and print the highest, the lowest positive number, the highest (closest to zero) negative number and the lowest number. If the user enters all positives or all negatives, print "none" for the missing output. … |
|
For my homework assignment, I'm supposed to get five numbers from a user and print the highest one using a loop. I'm not sure what to do. Any suggestions? |
|
For my homework assignment, we were asked to: Prompt the user for a positive number and get it from the user. Print each integer from 1 up to and including the user's number and the sum of all the integers from 1 up to and including each integer. Your output … |