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
int[] inputArray = new int[10]; | |
int i = 0; | |
while (n != 0) { | |
inputArray[i] = n%10; | |
n /= 10; | |
i++; | |
} |
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
package utopiantree; | |
import java.util.Scanner; | |
/** | |
* | |
* @author Slava | |
* | |
* The Utopian Tree goes through 2 cycles of growth every year. Each spring, it doubles in height. | |
* Each summer, its height increases by 1 meter. |
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
package sherlockandthebeast; | |
import java.util.Scanner; | |
/** | |
* | |
* @author Slava | |
* | |
* Sherlock and The Beast | |
* |
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
package sherlockandthebeast; | |
import java.util.Scanner; | |
/** | |
* | |
* @author Slava | |
* | |
* Sherlock and The Beast | |
* |
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.Scanner; | |
/** | |
* | |
* @author Slava | |
* | |
* Given a time in AM/PM format, convert it to military (24-hour) time. | |
* | |
* Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. | |
* |
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.Scanner; | |
/** | |
* | |
* @author Slava | |
* | |
* Your teacher has given you the task of drawing a staircase structure. Being an expert programmer, you decided to make a program to draw it for you instead. Given the required height, can you print a staircase as shown in the example? | |
* | |
* Input | |
* You are given an integer depicting the height of the staircase. |
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.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class FractionsOfPositivesNegativesAndZeroesInArray { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); |
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.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
//Java class that calculates the absolute value for the difference between the sums of two diagonals of a matrix of size NxN. | |
public class matrixDiagonalDifference { | |
public static void main(String[] args) { |
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
package jollyjumpers; | |
import java.util.ArrayList; | |
import java.util.Scanner; | |
import java.util.regex.Pattern; | |
/** | |
* | |
* @author Slava Ceornea | |
* |
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
New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname selfsignedcertificate.internal | |
# change Pa$$word with your own | |
$pwd = ConvertTo-SecureString -String "{Pa$$word}" -Force -AsPlainText | |
# in between parantheses on the next line use the ID you get by running the first command | |
Export-PfxCertificate -cert Cert:\localMachine\my\{15034633B1C5D9FB68EAD7984B7816C1D73D27E2} -FilePath c:\temp\selfsignedcertificate.internal.pfx -Password $pwd |