This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to find out which attributes exist for C# debugging | |
// Use hover for the description of the existing attributes | |
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": ".NET Core Launch (console)", | |
"type": "coreclr", | |
"request": "launch", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
class Main { | |
public static String LetterChanges(String str) { | |
char[] chars = str.toCharArray(); | |
for (int i = 0; i < chars.length; i++) { | |
if (Character.isLetter(chars[i])) | |
if (('a' <= chars[i] && chars[i] < 'z') || ('A' <= chars[i] && chars[i] < 'Z')) | |
chars[i] = (char)(chars[i] + 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
class Main { | |
public static String LetterCapitalize(String str) { | |
String[] words = str.split(" "); | |
StringBuilder sb = new StringBuilder(); | |
for (String word : words) { // for each word | |
if (Character.isLowerCase(word.charAt(0))) {// if first char is lower case | |
char[] chars = word.toCharArray(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
class Main { | |
public static String SimpleSymbols(String str) { | |
Pattern regex = Pattern.compile("[a-zA-Z]"); | |
Matcher match = regex.matcher(str); | |
while (match.find()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
class Main { | |
public static int FirstFactorial(int num) { | |
return (num == 1) ? num : num * FirstFactorial(num - 1); | |
} | |
public static void main (String[] args) { | |
// keep this function call here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
class Main { | |
public static int SimpleAdding(int num) { | |
return (num == 1) ? 1 : num + SimpleAdding(num - 1); | |
} | |
public static void main (String[] args) { | |
// keep this function call here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
class Main { | |
public static String CheckNums(int num1, int num2) { | |
if (num1 < num2) | |
return "true"; | |
else if (num1 > num2) | |
return "false"; | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
class Main { | |
public static String TimeConvert(int num) { | |
return (num / 60) + ":" + (num % 60); | |
} | |
public static void main (String[] args) { | |
// keep this function call here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
class Main { | |
public static String LongestWord(String sen) { | |
String[] words = sen.split("\\W"); | |
String longest = ""; | |
for (String word : words) | |
longest = word.length() > longest.length() ? word : longest; | |
return longest; |