User Profile

Collapse

Profile Sidebar

Collapse
mastern200
mastern200
Last Activity: Oct 23 '07, 10:32 PM
Joined: Oct 24 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mastern200
    started a topic pig latin translator error help
    in Java

    pig latin translator error help

    Hello there. i need some help finishing up my pig latin translator program. It compiles fine, but when i run it and try to translate a sentence, it gives me a syntax error and i cannot see the error. i am almost done with it, please help!

    Code:
    import java.io.*;
    import java.util.*;
    import java.lang.String;
    
    public class IgLatinPay
    {
    	public static void main(String [] args)
    	{
    ...
    See more | Go to post

  • mastern200
    replied to Tic Tac Toe help
    in C
    My problem is when player one says to put X in row 0, column 0, the X doesnt show up (obviously, because i havent put the code there) i am wondering what that specific code is. thanks

    [CODE=cpp]
    #include <iostream>
    #include <vector>
    using namespace std;

    void displayBoard(co nst vector< vector<char> > &table);
    void getMove(vector< vector<char> > &table);...
    See more | Go to post

    Leave a comment:


  • mastern200
    started a topic Tic Tac Toe help
    in C

    Tic Tac Toe help

    Hello. I need help creating a tic tac toe program for a final exam using vectors. I am confused with the whole thing in general and not sure how to complete it. I would appreciate it if someone could help me complete this program, with hints, or the whole code, whatever works :) thank you

    [CODE=cpp]
    #include <iostream>
    #include <vector>
    using namespace std;

    void displayBoard(co nst vector<...
    See more | Go to post

  • mastern200
    replied to ifstream ofstream help
    in C
    I know that, thanks, but the problem is how to store the names in the vector after the file is opened.
    See more | Go to post

    Leave a comment:


  • mastern200
    replied to ifstream ofstream help
    in C
    OK i get it, thanks. But here is the real problem: The program should ask the user where is a text file. The file should open and it will be a list of names. The names should be stored in a vector after being read by the program.The program then will call a function named print that prints to the monitor the list of names, numbered starting with 1. It will ask the user if they want to delete a name, insert a name, or write the names to a file and...
    See more | Go to post

    Leave a comment:


  • mastern200
    started a topic ifstream ofstream help
    in C

    ifstream ofstream help

    I need to make a program where it can read from a file and write to it. But the problem is, all i can do is read from it and not write to it. This is the code i have so far:

    Code:
    # include <iostream>
    # include <fstream>
    # include <cstdlib>
    # include <iomanip>
    # include <string>
    # include <vector>
    
    using namespace std;
    
    int main()
    ...
    See more | Go to post

  • mastern200
    started a topic Compound Interest with recursion help
    in C

    Compound Interest with recursion help

    I need to make a program that calculates Compound Interest (compounded monthly). Thing is, it has to use recursion. I don't know how to implement it in though. This is the code i have so far.

    Code:
    #include<iostream>
    #include<cstdlib>
    using namespace std;
    
    float initialDeposit=0;
    int depositMonth=0;
    float interestRate=0;
    float total=0;
    void mainFunction();
    ...
    See more | Go to post

  • mastern200
    replied to Adding Random Numbers help
    in C
    My bad, there were 2 equal signs :)

    BUT is there a way i can make it so that after 3 guesses, it disables the user from entering anything else and it displays the real answer?
    See more | Go to post

    Leave a comment:


  • mastern200
    replied to Adding Random Numbers help
    in C
    OK i understand. But now, if i put the right answer, it says WRONG!. Even after i put num1 and num2.

    Code:
    int calcRealAnswer(){
    if (choice==1){
    int realAnswer;
    int num1, num2;
    realAnswer = num1 + num2;
    
    if (userAnswer == realAnswer){
    cout << "Correct!";
    }
    
    else
    {
    cout << "Wrong!";}
    }
    }
    See more | Go to post

    Leave a comment:


  • mastern200
    started a topic Adding Random Numbers help
    in C

    Adding Random Numbers help

    I need to create a program where the user selects addition, subtraction, or multiplication, and when they select one, 2 random numbers appear, and they must put in the right answer. The problem is, i cant get the correct answer. It just says: Would you like to play again?

    Code:
    #include <iostream>
    #include <cstdlib> 
    #include <ctime> 
    using namespace std;
    
    void displayHeader();
    ...
    See more | Go to post

  • mastern200
    started a topic Homework help...
    in C

    Homework help...

    I need some homework help with an assignment due wed. I need to make a program where in this program calculates the average of a set of test scores.
    The program will ask the user how many scores there will be.
    The user will be prompted to enter score 1, score 2, etc.
    After the scores are entered the computer will print the total number of points, the average score, and the number of scores. The program will ask the user...
    See more | Go to post

  • mastern200
    started a topic Homework problem with satellite program
    in C

    Homework problem with satellite program

    I need to make a program where:

    In this program you MUST use the following functions and header file (library function):
    • #include<cmath >
    • fabs
    • pow
    • sqrt

    You run a company that ships satellite dishes to customers. The satellite dish is ordered based on the area of its opening (in square inches):

    You need to calculate how much cardboard (in square inches)...
    See more | Go to post

  • Is there a way to make a cpp file into a python file?

    read topic.
    See more | Go to post

  • mastern200
    replied to Homework Help!
    in C
    OK thank you, but it gives me this:

    --Vote Analysis Program--
    Enter votes for Kerry: 1
    Enter votes for Bush: 1
    Enter votes for Working: 1

    Candidate : Kerry
    Votes: 1
    Percentage: 33

    Candidate : Bush
    Votes: 1
    Percentage: 33

    Candidate : Working
    ...
    See more | Go to post

    Leave a comment:


  • mastern200
    replied to Homework Help!
    in C
    what the teacher told me is that the votes and the total must be ints. i tried replacing the percents with both doubles and floats and the static cast with both doubles and float (every combination i think) and it still didnt work...
    See more | Go to post

    Leave a comment:


  • mastern200
    started a topic Homework Help!
    in C

    Homework Help!

    For Homework, i have to debug a program (I am a noob!) it is a voting program where you put in the amount of votes a certain candidate gets and evaluates by showing how many votes, what percentage of votes, and total. Problem is that it rounds everything and doesnt show what it is supposed to show. I got this far... Please help!



    #include <iostream>
    #include "string.h"
    using namespace std;...
    See more | Go to post
No activity results to display
Show More
Working...