Create a method GetMax() which takes two integer (int) parameters as an arguments and returns maximal of the two numbers.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

PF Assignment 3

BS ERP 105903

Submission date: 18th April, 2021 via LMS

Assignment should include:Hand Wriiten Coding  + Screenshot of Output

 

  1. (a) Create a method GetMax() which takes two integer (int) parameters as an arguments and returns maximal of the two numbers.

(b) Write a program that reads three numbers from the console and prints the biggest of them. Use the GetMax() method you just created. Write a test program that validates that the methods works correctly.

 

  1. Write a method that returns the digits of a given decimal number in a reversed order. For example 256, must be printed as 652.

 

  1. Write a program in C to check a given number is positive or negative using method.

 

  1. 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.

 

  1. 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

 

  1. 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

 

  1. Write a program to check whether a number is prime or not number should be pass as an argument to method.

 

  1. 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

 

  1. Make a method that takes two arguments: string and a number, and write string as many times till number is not zero.

 

  1. Make a method with name IsEven() that takes only integer value as argument and return true if given argument value is even otherwise false.
  2. Make a method with prototype:

public static bool IsDivisible(int _integerNumber, decimal _decimalNumber)

and returns true if _integerNumber is divisible by _decimalNumber otherwise false.

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education