- 3
Fill in the blanks to declare a method that takes one integer parameter and then displays the value divided by 2.
Void myfunc (int x) { int result = x/2; Console.WriteLine ( ); } Can anyone help me?
8 Antworten
+ 2
public static void main(String[ ] args) {
int
x = 10;
test(
x
);
}
static void test(int x) {
System.out.println(x);
}
+ 2
Fill in the blanks to declare a method and call it from Main with the argument 88:
static
void func(int x)
{
Console.WriteLine(x/2);
}
static void Main(string[] args)
{
func
(
88
);
}
Try This
0
result ^.^
is tha answer for this
void MyFunc(int x)
{
int result = x /2
Console.WriteLine (result );\
}
0
int
text(x)
0
Fill in the blanks to declare a method and call it from Main with the argument 88:
0
Fill in the blanks to declare a method and call it from Main with the argument 88:
void func(int x)
{
Console.WriteLine(x/2);
}
static void Main(string[] args)
{
(
);
}
What is this????
0
Fill in the blanks to define a method doubleNum that takes an integer as its parameter and outputs its double.
Then call it in main with the argument 42.
static void doubleNum (int num) {
System.out.println(num * 2);
}
public static void main(String[] args) {
doubleNum(42);
}
- 1
void MyFunc(intx)
{
int result = x/2;
Console.WriteLine(result);
}