I've done Visual Basic stuff, but I want to start something in Cwhatever because I think it would be fun. No idea which to try, though. They both seem confusing as [censored].
// Bear with the shortcutsX = GetResolution().x;Y = GetResolution().y;Size = 30; // text size, picture size, etc.topMiddle = 2dVector(X/2,0-Size);bottomMiddle = 2dVector(X/2,Y-Size);leftMiddle = 2dVector(0,Y/2-Size);rightMiddle = 2dVector(X,Y/2-Size);Middle = 2dVector(X/2,Y/2-Size);
// Text placementvoid writeOnTop(string text, string font, int size){ DrawText(vector2(GetScreenSize().x/2,0),text, font, size, ARGB(200,255,255,255));}void writeOnBottom(string text, string font, int size){ DrawText(vector2(GetScreenSize().x/2,GetScreenSize().y-size),text, font, size, ARGB(200,255,255,255));}void writeOnLeft(string text, string font, int size){ DrawText(vector2(0,GetScreenSize().y/2),text, font, size, ARGB(200,255,255,255));}void writeOnRight(string text, string font, int size){// text.size() might not be right, but let's use it anyway DrawText(vector2(GetScreenSize().x-text.size(),GetScreenSize().y/2),text, font, size, ARGB(200,255,255,255));}
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { String userinput = ""; int usernumber1 = 0; int usernumber2 = 0; Console.Write("[A]dd or [M]ultiply? > "); userinput = Console.ReadLine(); userinput = userinput.ToUpper(); if (userinput == "M") { Console.Write("Enter First Number > "); usernumber1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Second Number > "); usernumber2 = Convert.ToInt32(Console.ReadLine()); multiplynums(usernumber1, usernumber2); } else if (userinput == "A") { Console.Write("Enter First Number > "); usernumber1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Second Number > "); usernumber2 = Convert.ToInt32(Console.ReadLine()); addnums(usernumber1, usernumber2); } else { Console.Write("\n\nInvalid Command"); } Console.WriteLine("\n\n\n\n\nPress Any Key To Exit..."); Console.ReadKey(); } static void multiplynums(int num1, int num2) { int num3 = (num1 * num2); Console.Write("\n{0} * {1} = {2}", num1, num2, num3); } static void addnums(int num1, int num2) { int num3 = (num1 + num2); Console.Write("\n{0} + {1} = {2}", num1, num2, num3); } }}
if (userinput == "M") { Console.Write("Enter First Number > "); usernumber1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Second Number > "); usernumber2 = Convert.ToInt32(Console.ReadLine()); multiplynums(usernumber1, usernumber2); } else if (userinput == "A") { Console.Write("Enter First Number > "); usernumber1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Second Number > "); usernumber2 = Convert.ToInt32(Console.ReadLine()); addnums(usernumber1, usernumber2); } else { Console.Write("\n\nInvalid Command"); }
Console.Write("Enter First Number > "); usernumber1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Second Number > "); usernumber2 = Convert.ToInt32(Console.ReadLine()); if (userinput == "M") { multiplynums(usernumber1, usernumber2); } else if (userinput == "A") { addnums(usernumber1, usernumber2); } else { Console.Write("\n\nInvalid Command"); }
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { String userinput = ""; int usernumber1 = 0; int usernumber2 = 0; Console.Write("[A]dd or [M]ultiply? > "); userinput = Console.ReadLine(); userinput = userinput.ToUpper(); if (userinput == "M") { Console.Write("Enter First Number > "); usernumber1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Second Number > "); usernumber2 = Convert.ToInt32(Console.ReadLine()); multiplynums(usernumber1, usernumber2); } else if (userinput == "A") { Console.Write("Enter First Number > "); usernumber1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Second Number > "); usernumber2 = Convert.ToInt32(Console.ReadLine()); addnums(usernumber1, usernumber2); } else { Console.Write("\n\nInvalid Command"); } Console.WriteLine("\n\n\n\n\nPress Any Key To Exit..."); Console.ReadKey(); } static void multiplynums(int num1, int num2) { int num3 = (num1 * num2); Console.Write("\n{0} * {1} = {2}", num1, num2, num3); } static void addnums(int num1, int num2) { int num3 = (num1 + num2); Console.Write("\n{0} + {1} = {2}", num1, num2, num3); } }}