Help me in solving THALA7 problem

My issue

only thala as a output is giving for any value of n

My code

#include <iostream>
using namespace std;

int main() {
    int n;
cin>>n;
if(n=7) {
    cout<<"THALA"<<endl;
}
else {
 cout<<"SADGE"<<endl;
}
}

Problem Link: Thala For A Reason Practice Coding Problem - CodeChef

@ayushbatman
put n==7 instead of n=7

1 Like

in place of (n=7) use (n==7)… because n=7 means you are assigning the value of n is 7.