Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Codewars/YESORNO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package Codewars;
/*
* URL: https://www.codewars.com/kata/53369039d7ab3ac506000467/train/java
*/

import java.util.InputMismatchException;
import java.util.Scanner;

public class YESORNO {
public static void main(String[] args) throws InputMismatchException{

try (Scanner sc = new Scanner(System.in)) {
boolean arg = sc.nextBoolean();
System.out.println(boolToWord(arg));
}catch(InputMismatchException ex){
}
}

public static String boolToWord(boolean b) {
if (b) return "Yes";
return "No";
}

}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ In this repository, you can find the solutions (as source code) for the problems
| [Nauman Chaudhary](https://github.com/nauman-chaudhary) <br> <img src="https://github.com/nauman-chaudhary.png" width="100" height="100"> | Pakistan | Python | |
| [Gourav Rusiya](https://github.com/GouravRusiya30) <br> <img src="https://github.com/GouravRusiya30.png" width="100" height="100"> | India | Java | https://www.hackerrank.com/gouravrusiya786 |
| [Trushita Maurya](https://github.com/trushita23) <br> <img src="https://github.com/trushita23.png" width="100" height="100"> | India | Java
| [Santiago Cardona](https://github.com/lycan66) <br> <img src="https://avatars.githubusercontent.com/u/139978963?s=400&v=4" width="100" height="100"> | Colombia | Java
### License

[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/ows-ali/Hacktoberfest/blob/master/LICENSE)