Thread: Adding Values from two separate functions values together.

  1. #1
    Registered User
    Join Date
    Sep 2018
    Posts
    1

    Adding Values from two separate functions values together.

    I've coded a game that makes the user pick a game. Then within each game, they choose how many problems they want and how high the number can get. Each game outputs a score for each choice. I'm having trouble figuring out how to get the total score for both games. I'm using functions and then calling them within int main. (Using C code).
    1. Play Arithmetic Game.
    2. Play Guessing Game.
    3. Print Score.
    4. Quit

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    total = game1 + game2;
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adding 2 Values in 'if else'
    By En-Motion in forum C Programming
    Replies: 10
    Last Post: 10-14-2008, 10:19 PM
  2. A reference to separate pairs of values
    By SevenThunders in forum C++ Programming
    Replies: 22
    Last Post: 04-03-2008, 05:06 PM
  3. Adding my values together
    By sitestem in forum C++ Programming
    Replies: 2
    Last Post: 04-20-2004, 03:01 PM
  4. Adding Values Of An Array
    By moenia in forum C++ Programming
    Replies: 2
    Last Post: 05-12-2003, 02:32 PM
  5. adding ASCII values
    By watshamacalit in forum C Programming
    Replies: 1
    Last Post: 12-26-2002, 07:16 PM

Tags for this Thread