Create a method GetMax() which takes two integer (int) parameters as an arguments and returns maximal of the two numbers.
PF Assignment 3
BS ERP 105903
Submission date: 18th April, 2021 via LMS
Assignment should include:Hand Wriiten Coding + Screenshot of Output
- (a) Create a method GetMax() which takes two integer (int) parameters as an arguments and returns maximal of the two numbers.
(b) Write a
- Write a method that returns the digits of a given decimal number in a reversed order. For example 256, must be printed as 652.
- Write a program in C to check a given number is positive or negative using method.
- Write a program that calculates and prints the n! for any n in the range [1…10] number should be taken as input from user through main and should pass as an argument to the method.
- Write a program in C# Sharp to create a function to input a string and return count of number of spaces are in the string
For example: “I love Pakistan” contains 3 spaces
- Write a program to create a method to display the n number Fibonacci sequence
Input number of Fibonacci Series : 6 (taken from main and pass as argument to the method)
Expected Output :
The Fibonacci series of 6 numbers is :
0 1 1 2 3 5
- Write a program to check whether a number is prime or not number should be pass as an argument to method.
- Write a program which will return the sum of the individual digits of a given number (number should be pass as an argument to method) For example inputted no is 527 so the sum is 5+2+7=14
- Make a method that takes two arguments: string and a number, and write string as many times till number is not zero.
- Make a method with name IsEven() that takes only integer value as argument and return true if given argument value is even otherwise false.
- Make a method with prototype:
public static bool IsDivisible(int _integerNumber, decimal _decimalNumber)
and returns true if _integerNumber is divisible by _decimalNumber otherwise false.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images