int FeetToInches(int feet)
is a method accepting the paramter feet
of type int
and defines a return type of int
.
return;
can only be used in a method without a return type, return inches;
returns the variable inches
About the difference in your code sample, they differ in a lot of ways, and the only thing they share is * 12
to calculate feet. But input and output are different.
solved what is the difference between these codes “c sharp , c#”? [closed]