+ 1

Can someone help to make a code using C# language?

31st Aug 2021, 9:07 AM
Ze Shion
Ze Shion - avatar
27 Respuestas
+ 3
Yeah we all here for that! Tell us what's the issue
31st Aug 2021, 9:10 AM
Vtec Fan
Vtec Fan - avatar
+ 2
Please share the code
31st Aug 2021, 9:10 AM
Vtec Fan
Vtec Fan - avatar
+ 1
Ze Shion Are you required to create inputs also, or just print out those statements. Can you attach your attempt? It makes it easier to assist
31st Aug 2021, 10:17 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Ze Shion It looks like you wrote this all at once, then ran it. Might I suggest you write one concept only and test that concept for viability. If it works, then build on it, and keep testing. I was getting indications of {} in strange places, which indicates that you may have introduced more flaws while searching for the original bug
31st Aug 2021, 11:48 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
can you help me to write code sir/ma'am??
31st Aug 2021, 11:54 AM
Ze Shion
Ze Shion - avatar
+ 1
chill dude
1st Sep 2021, 6:33 PM
Ze Shion
Ze Shion - avatar
+ 1
omyyy
1st Sep 2021, 6:34 PM
Ze Shion
Ze Shion - avatar
+ 1
That's what I thought the first time around, watch out for the beasts like Vats [ DEV ] I and JOY .. Those wakes me up at night
1st Sep 2021, 6:39 PM
l4t3nc1
l4t3nc1 - avatar
+ 1
https://code.sololearn.com/cL9taN1jD8Sk/?ref=app If you have to just print the statement, without any input, then it can help you.
2nd Sep 2021, 12:08 AM
VSR [ DEV ]
VSR [ DEV ] - avatar
+ 1
woww its amazing
2nd Sep 2021, 12:35 AM
Ze Shion
Ze Shion - avatar
0
my teacher assigned me to create a code using c# language and the output of the code is like this Hello! Hello My age is 21 years old I'm studying Hello! I'm explaining
31st Aug 2021, 9:15 AM
Ze Shion
Ze Shion - avatar
0
using System; public class StudentAndTeacherTecherTest { public static void Main() { Person myPerson = new Person(); myPerson.Greet(); Student myStudent = new Student(); myStudent.SetAge(21); myStudent.Greet(); myStudent.ShowAge(); myStudent.Study(); } } public class Person { protected int age; public void Greet() { Console.WriteLine("Hello!"); } public void SetAge(int n) { age = n; } { public class Student : Person } public void Study() { Console.WriteLine("I'm studying"); } public void ShowAge() { Console.WriteLine("My age is {0} years old", age); } { public class Teacher : Person } public void Explain() { Console.WriteLine("I'm explaining"); } } }
31st Aug 2021, 11:29 AM
Ze Shion
Ze Shion - avatar
0
i cant run my code😭
31st Aug 2021, 11:29 AM
Ze Shion
Ze Shion - avatar
0
plsss help😭
31st Aug 2021, 11:29 AM
Ze Shion
Ze Shion - avatar
0
Why dont you just do Console.WriteLine(); a bunch of times?
31st Aug 2021, 8:14 PM
ITDW
0
Ze Shion Line that reads: Console.WriteLine(
quot;My age is {age} years old") ; You only missed the $ sign and the age variable position, at a glance. Hope I'm not too late.
1st Sep 2021, 5:51 PM
l4t3nc1
l4t3nc1 - avatar
0
They haven't heard of Stackoverflow.com yet, I was a lost soul before that miracle happened!
1st Sep 2021, 6:22 PM
l4t3nc1
l4t3nc1 - avatar
0
scratch??
1st Sep 2021, 6:27 PM
Ze Shion
Ze Shion - avatar
0
really??
1st Sep 2021, 6:27 PM
Ze Shion
Ze Shion - avatar
0
OML, Please keep the children off the street at night! I heard this one dude on a podcast all chuffed with himself because he could code better than any other because of scratch. lol. Doesn't the name say it already, scratch that.
1st Sep 2021, 6:28 PM
l4t3nc1
l4t3nc1 - avatar