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; | |
public class newins { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
String opCode = input.nextLine(); | |
String[] codeArgs = opCode.split(" "); | |
while (!opCode.equals("END")){// the while loop must be here, after we have our array, so it can check if there is "END" |
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; | |
public class InstructionSet_Broken { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
String opCode = input.nextLine(); | |
input.close(); | |
String[] codeArgs = opCode.split(" "); | |
long result=0; | |
while (opCode!="END"){ | |
switch (codeArgs[0]) { |
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
using System; | |
class TheBiggerstOf3 | |
{ | |
static void Main() | |
{ | |
Console.WriteLine("Enter first number: "); | |
double a=double.Parse(Console.ReadLine()); | |
Console.WriteLine("Enter second number: "); | |
double b=double.Parse(Console.ReadLine()); |
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
using System; | |
class DigitAsWords | |
{ | |
static void Main() | |
{ | |
Console.WriteLine("Enter digit (0 to 9): "); | |
int a = int.Parse(Console.ReadLine()); | |
switch (a) | |
{ |
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
using System; | |
class TheBiggestOf5 | |
{ | |
static void Main() | |
{ | |
Console.WriteLine("Enter number 1: "); | |
double a = double.Parse(Console.ReadLine()); | |
Console.WriteLine("Enter number 2: "); | |
double b = double.Parse(Console.ReadLine()); |