Skip to content

Instantly share code, notes, and snippets.

View SmileyVi's full-sized avatar

ViktoriaLizama SmileyVi

  • Sofia, Bulgaria
View GitHub Profile
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"
@SmileyVi
SmileyVi / InstructionSet_Break
Last active August 29, 2015 14:14
InstructionSet_Break
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]) {
@SmileyVi
SmileyVi / TheBiggestOfThree
Created January 23, 2015 14:25
TheBiggestOfThree
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());
@SmileyVi
SmileyVi / DigitsAsWords
Created January 21, 2015 10:39
DigitsAsWords
using System;
class DigitAsWords
{
static void Main()
{
Console.WriteLine("Enter digit (0 to 9): ");
int a = int.Parse(Console.ReadLine());
switch (a)
{
@SmileyVi
SmileyVi / gist:8d119dfcce64bf2ff60f
Last active August 29, 2015 14:13
TheBiggestOfFive
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());