What's so wrong!???

This is a discussion on What's so wrong!??? within the C++ Programming forums, part of the General Programming Boards category; I have huuuuuuuuuuuuuge trouble with this code. I get 10 errors! Code: #include <windows.h> #include <iostream.h> using namespace std; int ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    23

    Angry What's so wrong!???

    I have huuuuuuuuuuuuuge trouble with this code.

    I get 10 errors!

    Code:
    
    #include <windows.h>
    #include <iostream.h>
    
      using namespace std;
    
    int main () 
    { 
      int money; 
      int ihave;
    
      int lost; 
    
    
      cout << "Hur mycket pengar har du?" << endl;
      cin>>ihave;
    
      cout << "Hur mycket pengar har du tjänat den här månaden?" << endl; 
      cin>>money; 
    
      cout << "Hur mycket pengar har du förlorat den här månaden?" << endl; 
      cin>>lost; 
    
      ihave+=money;
      ihave-=lost;
      }
      if  (ihave<=0)
    
      {
    
      cout << "KONKURS! KONKURS! KONKURS!" << endl;
    
      Sleep(2000);
    
      return 0; 
    
      }
    
      else
      {
      cout << "Så här mycket pengar har du nu!" << endl; 
    
      cout << ihave << endl; 
    
      Sleep(2000);
    
      }
    
      {
      return 0;
      }
    .. zzz soooo tireed.

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,701
    I get 10 errors!
    ...indeed! Try this and wake up!


    Code:
    #include <windows.h>
    #include <iostream.h>
    
      using namespace std;
    
    int main () 
    { 
      int money; 
      int ihave;
    
      int lost; 
    
    
      cout << "Hur mycket pengar har du?" << endl;
      cin>>ihave;
    
      cout << "Hur mycket pengar har du tjänat den här månaden?" << endl; 
      cin>>money; 
    
      cout << "Hur mycket pengar har du förlorat den här månaden?" << endl; 
      cin>>lost; 
    
      ihave+=money;
      ihave-=lost;
    
     //...huh?-->   }
    
      if  (ihave<=0)
    
      {
    
      cout << "KONKURS! KONKURS! KONKURS!" << endl;
    
      Sleep(2000);
    
      return 0; 
    
      }
    
      else
      {
      cout << "Så här mycket pengar har du nu!" << endl; 
    
      cout << ihave << endl; 
    
      Sleep(2000);
    
      }
    
      //...huh?--> {
      return 0;
      }
    Code:
    bool flip(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() < 0;
    }

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    23

    Cool Thanks man!

    Thanks!..
    .. zzz soooo tireed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 07-15-2004, 03:30 PM
  2. Debugging-Looking in the wrong places
    By JaWiB in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-03-2003, 09:50 PM
  3. Confused: What is wrong with void??
    By Machewy in forum C++ Programming
    Replies: 19
    Last Post: 04-15-2003, 12:40 PM
  4. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 11:01 AM
  5. Whats wrong?
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 07-14-2002, 01:04 PM

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