Time:10-12
CodePudding user response:
public integer Tell you need a type integer return values
calls this method returns a value of type, the code must be inside the return
//methods: access to the input parameters of 2 times the value of the Public int Get2X (int x) {Int result=2 * x; return result; }
this is a c # I Usually, such sum shall return values, such as Private int the add (int a, int b) {return a+b;//it is returned a + b and, when you use the function, as long as you a, b values have } Use it like this: Int s=add (100200);//took 100 + 200 or 300 of the value assigned to s At the same time also limits the function must return a value of type int
Page link:https//www.codepudding.com/database/63663.html