YouTube video link : click here Question link : click here
Solution : in Java
import java.util.Scanner;
public class BoyorGirl {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char ch[] = sc.next().toCharArray();
int arr[] = new int[26];
for(char c: ch){
arr[c-'a']++;
}
int count = 0;
for(int i : arr){
if(i!=0){
count++;
}
}
if(count%2==0){
System.out.println("CHAT WITH HER!");
}else{
System.out.println("IGNORE HIM!");
}
}
}
______________________________________________
Thanks for visiting
1 Comments
I would like to have this code in c programming langauage
ReplyDelete