Questions: 1 680

Answers by our Experts: 1 680

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

a runner runs 14 kılometers in 45 minutes and 30 sec-

onds. Write a program that displays the average speed in miles per hour. (Note that

 1 mile is 1.6 kilometers.)


C program to initialize the value as 5.800000

3. Here We Go Again

by CodeChum Admin

This one’s probably one of the most popular recursion problems in programming. Your task is to create a recursive function that prints out the the first up to the nth number in the Fibonacci sequence by going through the numbers using recursion.


In case you forgot, here is the definition of a Fibonacci sequence:

  • fib(n) = 1 if n = 1 or n = 2
  • fib(n) = fib(n-1) + fib(n-2) when n > 2

Instructions:

  1. In the code editor, you are provided with an initial code with a main() that asks the user for an integer n, which represents the number of elements in the Fibonacci sequence to be printed out.
  2. In addition, you are also provided with an initial displayFibonacci() function which contains the code to supposedly display the first n elements in the Fibonacci sequence. However, it is not working as expected.
  3. Your task is to find where the error is and fix the displayFibonacci() function.

1. Write a C program that finds the smallest among the five integers inputted by the user. 

2. The following program determines the proper fare of a passenger with the following data: 

a.) Senior citizens and PWD enjoys 25% 

b.) Students enjoys 15% 

c.) Regular passengers have to pay the regular fare 



Create a staff/worker information system using C Struct where you’ll be able to –


a ) Insert staff/worker details with id, name and monthlySalary


b ) Display staff/worker details (searched by id)


c ) Update monthlySalary of a staff/worker

write a program using pointer to strings that acceptd the name of an animal and a bird and returns the names in plural


Write an algorithm and implement a program in C to read the data from a

file (called “test.txt”), transform the data according to the discussion in

“Introductory”, and afterwards, save in another file (called “final.txt”).


Create a function which receives a pointer of array as a parameter and calculates the sum of prime

numbers and sum of non_prime numbers in that array. Then compares them to find out which one is

larger (sum of prime or sum of non_prime). Return both sum of prime and sum of non_prime numbers

also and print those in the main function.


Create a function to compare the elements of 2 arrays. Function should receive two pointers to an array

and then check if the elements are same in both arrays or not. If both arrays are same return true,

otherwise false.


Suppose you want to send a message to your friend but don’t want others to understand that message.

So, you have decided to encrypt the message.

Now, suppose the message is in a string variable called MSG. a) You have to encrypt the message and

change the string so that others cannot understand it. b) Again, decrypt the encrypted message.


LATEST TUTORIALS
APPROVED BY CLIENTS