Changing Output

This is a discussion on Changing Output within the C++ Programming forums, part of the General Programming Boards category; If I were to make a basic addition calculater and say I wanted to have some thing lke this: Code: ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    10

    Question Changing Output

    If I were to make a basic addition calculater and say I wanted to have some thing lke this:

    Code:
    char a, b, c;
    cout<<"Input your first number:";
    cin>>a; //While this number is input I would want to have it
    cout" /n Input your second number:"; //doing this 
    cin<<b; //at this exact position   :(A+B=(C)
    return a+b;
    What would be the function I would use to place A+B at that position?
    To do this I think ( I think) I would have to use the function getchar(). If you can help me please help. Thanks

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    10
    Oops, where the is it is s'post to be : (a+b=C)
    The Jripe.
    Whatever that means.

  3. #3
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Disable Smilies in This Post
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Would you mind posting your attempt at this?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help for my output array
    By qwertysingh in forum C Programming
    Replies: 1
    Last Post: 02-17-2009, 02:08 PM
  2. execl()/fork() output
    By tadams in forum C Programming
    Replies: 19
    Last Post: 02-04-2009, 02:29 PM
  3. strange virtual function output
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 02-08-2008, 07:08 AM
  4. Basic C input output program help
    By trevordunstan in forum C Programming
    Replies: 2
    Last Post: 01-27-2008, 05:41 PM
  5. Trying to store system(command) Output
    By punxworm in forum C++ Programming
    Replies: 5
    Last Post: 04-20-2005, 06:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21