Thread: What's so wrong!???

  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,708
    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:
    #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;
    }

  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, 10: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, 12:01 PM
  5. Whats wrong?
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 07-14-2002, 01:04 PM