Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Simple inheritance
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Parent { public int value_1; public int value_2; public Parent(){ value_1=Convert.ToInt32(Console.ReadLine()); value_2=Convert.ToInt32(Console.ReadLine()); } } public class Child : Parent { public void result(){ Console.WriteLine(value_1*value_2); } } public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine("Hello, world!"); Child c =new Child(); Child d= new Child(); c.result(); d.result(); Console.WriteLine(c.value_1 +","+c.value_2); Console.WriteLine(d.value_1 +","+d.value_2); } } }
run
|
edit
|
history
|
help
0
Hello world... I need cc!!
9
Find Max Number Of Occurences in an int array
Swap adjacent Elements
prime_number
sintildes
Main4-2
enigma 2
dsdsfdfgdfgfgfg
Decimal separator diff