Q1: Complete the following program by writing its functions: static void Main(....) { } 10, 12, 7, 8}; double z; long P=1; int a, b, c=-4; int[] f = {1, 3, 9, int g = abs (c); Prime (f, out b); Find (g, out z); Power (a [1],a [2], ref double d-fact (g); Max (f); Console.Write("{0}: C# // return absolute value of c // b=the average of Prime numbers in f // z = 1! + 2! + ... + g! p); // where P= a[1]a[2] // return the factorial of x using // recursion principle // print the maximum value of f {1}{2}: {3}: {4}",g,b, z,p, d);

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 8SA
icon
Related questions
Question
Q1: Complete the following program by writing its functions:
static void Main(....)
{
}
double z; long P=1; int a, b, c=-4;
int[] = {1, 3, 9, 10, 12, 7, 8};
f
int gabs (c);
Prime (f, out b);
Find (g, out z);
Power (a [1], a [2], ref p); // where P= a[1]a[²]
double d-fact (g) ;
Max (f);
C#
// return absolute value of c
// b=the average of Prime numbers in f
// z = 1! + 2! + ... + g!
// return the factorial of x using
// recursion principle
// print the maximum value of f
Console.Write("{0}: {1}{2}: {3}: {4}",g,b,z,p,d);
Transcribed Image Text:Q1: Complete the following program by writing its functions: static void Main(....) { } double z; long P=1; int a, b, c=-4; int[] = {1, 3, 9, 10, 12, 7, 8}; f int gabs (c); Prime (f, out b); Find (g, out z); Power (a [1], a [2], ref p); // where P= a[1]a[²] double d-fact (g) ; Max (f); C# // return absolute value of c // b=the average of Prime numbers in f // z = 1! + 2! + ... + g! // return the factorial of x using // recursion principle // print the maximum value of f Console.Write("{0}: {1}{2}: {3}: {4}",g,b,z,p,d);
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Declaring and Defining the Function
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning