Thread: Help!

Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    12
    Rep Power
    0
    can you improve this for me? because i have tried my best.



    #include <iostream>
    using namespace std;
    void main(void)
    {
    int tempsensor; //from the temperature sensor console

    int revolcycle; //gotten from the motor console
    int timer;
    char washtype;
    int revolution = revolcycle/timer;
    char cotton;
    char quickwash;
    if (washtype = cotton) //link to a button in the machine through console
    {
    tempsensor = 80;
    cout <<"ready for cotton";
    }
    if (washtype = quickwash)
    {
    tempsensor = 40;
    cout<<"ready for quick wash";
    }
    int rinse (int revolution)
    {
    return 1000;
    }
    int dry (int revolution)
    {
    return 1000;
    system ("pause");
    }
    }
  2. #17
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    101
    Rep Power
    0
    Code:
    if (washtype = cotton)
    Look up the difference between "=" operator and "==" operator.
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo