Computer Science, asked by shreya0703, 4 months ago

A new taxi service based on electric vehicles is offering services within a metro city. Following is the

fare chart including the type of taxi used to commute and price per kilometer. Create a program to

calculate total fare depending on the distance travelled in kilometers.

QUESTION 6 [15]

Write a program to input integer elements into an array of size 20 and perform the following

operations:

1. Display largest number from the array.

2. Display smallest number from the array.

3. Display sum of all the elements of the array

QUESTION 7 [15]

Using switch statement, write a menu driven program to:

(i) To find and display all the factors of a number input by the user ( including 1 and the excluding

the number itself).

Example:

Sample Input : n = 15

Sample Output : 1, 3, 5

(ii) To find and display the factorial of a number input by the user (the factorial of a non-negative

integer n, denoted by n!, is the product of all integers less than or equal to n.)

Example:

Sample Input : n = 5

Sample Output : 5! = 1*2*3*4*5 = 120

Type Fare

Micro 10.05/Km

Macro 15.05/Km

Shared 7.05/Km​

Answers

Answered by aakashupadhyay60
0

Answer:

Gaira was asked to evaluate the algebraic

expression –3.8x + 6 when x = –7.5.

–3.8(–7.5) + 6(–7.5)

28.5 + (–45)

(–16.5)

What mistake did she make? What is the correct answer?

Similar questions