I have enter this into codeblocks but no matter what I change it always gives the answer as yes...
How do I fix this?Code:// My program which is based on a tutorial #include <iostream> using namespace std; int main () { int ans; cout<<"Can you spell tea? Type 1 for yes or 0 for no.\n"; cin>>ans; cin.ignore (); if (ans=1) { cout<<"you can!?"; } else if (ans=0) { cout<<"You Can't!?"; } return 0; }