0% found this document useful (0 votes)
2 views

2_DotNet_functions

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

2_DotNet_functions

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

TASK # 36 – Function with no parameter and no return type p

Worksho
1) Type the code  Discuss
TASK # 37 – Function with parameter and no return type p
Worksho
1) Type the code  execute
TASK # 38 – Function with parameter and return type p
Worksho
1) Type the code  execute
2) Discuss line # 9, 13, 14, 22-27
TASK # 39 – (Factorial)without using functions p
Worksho
1) Type the code  execute

Make the
gram
same pro
using a
function
TASK # 40 – Functions p
Worksho

1) Accept two numbers from the user

2) Make a function named “calc” that will accept three


parameters – num1, num2 and char. The char will be a code
for the operation like ‘a’ for addition, ‘d’ for division, ‘s’
subtraction and ‘m’ for multiplication.

3) Hint : calc(int num1, int num2, char operation)


TASK # 41 - Workshop

1. Accept a number from the user.

2. Pass that value as a first parameter to a function named


“table()” that will print the table.

3. Now, change the program to accept another number from


the user. Pass it as a second parameter to the “table()”
function and print table up to this number
TASK # 42 – Function Call by Value p
Worksho
1) Type the code  Discuss
TASK # 43 – Function Call by Reference p
Worksho
1) Type the code  Discuss

You might also like