Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace NumberM {
- class InputLocation {
- public static void Main (string [] args) {
- int PlsCall;
- begin:
- Console.Write ("Please specify a number : ");
- string NumInput = Console.ReadLine ();
- int NumNewValue = Int32.Parse (NumInput);
- Console.WriteLine("Is {0} the number you specified?", NumNewValue);
- string Ans = Console.ReadLine();
- if (Ans == "yes" || Ans == "Yes") {
- Console.WriteLine ("That means {0} is your number. All right. Calculating.");
- // disable once SuggestUseVarKeywordEvident
- CalcNumb InP = new CalcNumb();
- PlsCall = InP.Calculation (NumNewValue);
- } else {
- Console.WriteLine ("That might be an issue. Taking back.");
- goto begin;
- }
- }
- }
- class CalcNumb {
- public int Calculation (int number) {
- int Store = number * number;
- Console.WriteLine ("This is the square of your number : {0}" , Store);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement