Questions: 1 978

Answers by our Experts: 1 850

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

write a program, When the racer is outside the covered section:


The audible warning must turn ON and OFF with the rear Light.


• When the racer is inside the covered section:


The audible warning must stay ON.


write a program, When the racer is outside the covered section:


The two headlights and the rear light must turn ON and OFF alternatively (when headlights are ON, the rear light must be OFF and vice versa) for 1 second in each state.


• When the racer is inside the covered section: The two headlights must turn ON and OFF alternatively for 0.5 seconds in each state. The rear light must stay ON for the whole duration. 


Sort It Yourself

by CodeChum Admin

A descending order means values arranged from largest to smallest. But in your case, you're going to have to sort these integers in ascending order, which means from smallest to largest.


Instructions:

  1. Input three integers.
  2. Print the integers in ascending order using your knowledge on conditional statements.

Input


1. First integer

2. Second integer

3. Third integer

Output


The first three lines will contain message prompts to input the 3 integers.

The last line contains the three integers in ascending order.


TEST CASES

Enter the first integer: 6
Enter the second integer: 1
Enter the third integer: 3
1 3 6


Enter the first integer: 6
Enter the second integer: 4
Enter the third integer: 2
2 4 6


Enter the first integer: 0
Enter the second integer: 2
Enter the third integer: 0
0 0 2


Enter the first integer: 1
Enter the second integer: 1
Enter the third integer: 1
1 1 1

an ecommerce website wishes to find the lucky customer who will be eligible for full value cashback. for this purpose, a number n is fed to the system. it will return another number that is calculated by an algorithm. in an algorithm, a sequence is generated, in which each number is the sum of the two preceding numbers. initially, the sequence will have two 1's in it. the system will return the nth number from the generated sequence which is treated as the order id. the lucky customer will be the one who has placed that order. write an algorithm to help the website find the lucky customer.


#include <stdio.h>


int main()

{

 int x[9];

 int res;

 

  printf("Input 9 integers:\");

 scanf("%d %d %d %d %d %d %d %d %d",&x[0],&x[1],&x[2],&x[3],&x[4],&x[5],&x[6],&x[7],&x[8]);

  

 printf("\%d\%d\%d = %d\",x[0],x[1],x[2], x[0]+x[1]+x[2]);

 printf("%d\%d\%d = %d\",x[3],x[4],x[5], x[3]+x[4]+x[5]);

 printf("%d\%d\%d = %d\",x[6],x[7],x[8], x[6]+x[7]+x[8]);

 printf("-------------------------\");

 res = x[0]+x[3]+x[6]+x[1]+x[4]+x[7]+x[2]+x[5]+x[8];

 printf("%d\%d\%d = %d",x[0]+x[3]+x[6],x[1]+x[4]+x[7],x[2]+x[5]+x[8],res);

  

 return 0;

}


Q2: Suppose you have a main() with three local arrays, all the same size and type (say



float). The first two are already initialized to values. Write a function called



sumArrays() that accepts the addresses of the three arrays as arguments; adds the contents



of the first two arrays together, element by element; and places the results in the



third array before returning. A fourth argument to this function can carry the size of the



arrays. Use pointer notation throughout; the only place you need brackets is in defining

You have to explain these instructions below with respect to the Type Systems and Type Expressions:






int number=5, d;






float m=25.5;






d=m/number;






if(number %d==0)






printf(“Divisible”);






else if(m%d)






printf(“Non-Divisible”);






else






printf(“Wrong program!”);

Write a program for the memory management.

Write a program that reads in a sequence of characters and prints them in reverse order (Use a stack).


Given an array array[], its starting position l and its ending position r. Sort the



array using Bucket Sort algorithm.



8



Input: N = 10



array[] = {10 9 7 8 6 2 4 3 5 1}



Output: 1 2 3 4 5 6 7 8 9 10

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS