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

Negative Allergy

by CodeChum Admin

Whole numbers are great, but I think we should also pay attention to decimal numbers, too.


So, how about we make a program that involves a lot of decimals?


Instructions:

  1. Continuously ask for floating point values (decimal numbers) using the do…while() loop, sum them all up, and store the total into one variable.
  2. The loop shall only terminate for the following reasons:
  3. A negative decimal number is inputted (but still included in the total sum)
  4. The total sum reaches 100.0 or more

Input


1. A series of float numbers

Output


The first multiple lines containing message prompts for float numbers.

The last line contains the sum with 2 decimal places.


Enter a number: 1.1
Enter a number: 1.2
Enter a number: 1.3
Enter a number: 1.4
Enter a number: -1.0
Sum = 4.00

Against All "Odds"

by CodeChum Admin

Looping numbers is fun, but it's even more exciting when we combine complex tasks to it, just like looping through a series of numbers and performing a series of code only to special numbers, like odd ones! And today, we're going to do just that.


Are you ready?


Instructions:

  1. Input a positive integer. This will serve as the starting point of the loop.
  2. Using a while() loop, print out all the odd numbers starting from the inputted integer, until 0. The outputted numbers must all be separated by line.
  3. Also remember that since the loop goes to descending order, a decrement variable shall be created and decreased per iteration for the loop to terminate when it reaches 0.

Input


1. An integer

Output


The first line will contain a message prompt to input the integer.

The succeeding lines contain the odd numbers.

Enter n: 10
9
7
5
3
1

 Visibly Divisible

by CodeChum Admin

Do you still know what being divisible by a certain number means? In case you forgot, being divisible means that the number is capable of being divided by another number without a remainder. With this knowledge, you can surely solve this problem!


Instructions:

  1. Input one integer.
  2. Make a conditional statement that contains the following conditions:
  3. If the integer is only divisible by 3, print "Divisible by 3"
  4. If the integer is only divisible by 4, print "Divisible by 4"
  5. If the integer is divisible by both 3 and 4, print "Divisible by 3 and 4"

Input


1. An integer

Output


The first line will contain a message prompt to input the integer.

The second line contains the appropriate message.

Enter n: 6
Divisible by 3


Enter n: 12
Divisible by 3 and 4


Enter n: 4
Divisible by 4




Instructions:

  1. Input one number (integer or decimal), an operator (+, -, *, /), and another number (integer or decimal). Again, since we're scanning a character, don't forget to add a space before the character's placeholder like this, " %c", so that it won't be the newline character that will be scanned for the operator.
  2. Print the result of the operation between the two numbers, up to 2 decimal places.

Input


1. First number

2. Operator

3. Second number

Output


The first line will contain a message prompt to input the first number.

The second line will contain a message prompt to input the operator.

The third line will contain a message prompt to input the second number.

The last line contains the result with 2 decimal places.


Enter the first number: 5
Select the operator (+, -, *, /): +
Enter the second number: 0.70
Result = 5.70






Can I get wedding game code in c programming it's urgent

Wedding Game




In a wedding that you are attending, there are some chairs that have digits inscribed at their




backs. The chairs are lined in a row such that they form a string of the digits. Find the




minimum number of sets M that can be formed from these digits such that:




1. The number of digits in each set is one gf more than one.




2. Each set is formed using consecutive digits and no digit can be used more than once.




3. In each set, the number formed using the digits is less than or equal to Y.​





The placement season has begun in a college. There are N number of students standing outside an interview room in a line. It is given that a person who goes in first has higher chances of getting selected

The following is a two-dimensional character array of size 12X12 which represents a maze. The symbol ‘#’ represent a wall of the maze and the symbol ‘.’ represents a possible path. There is an entry point and exit point of the maze, which are denoted by a ‘.’ Write a C program which takes text file which contains the maze as command line argument and prints the minimum number of moves required to go from entry to exit. If there is no path from entry to exit display “-1”. You need to formulate the maze as a graph and use Breadth First Search to find shortest path from entry to exit. You can treat each cell as a vertex and if we can go from one cell to other cell with one move add edge between the corresponding vertices. For example, for the below maze:

############

. . . ##. ##. . .# 

##. . . . . . . .## 

#. .######. ##

####. . . . . . .#

# . . . .#. ###.#

###. . . . . . . .#

#. . .######. #

#####. . .#. .#

#. . .#. #. #. ##

#.#. . .#. . . . .

############

Min moves: 22 


47:06



1 / Sample code to read input and write output



3- /"



4 #include <stdio.h>



6 int main() 7- (



char name[20]; scanf("%s" name);



printf("hello Ns", hame);



return 0;



77 Warning: Printing unwanted or-111-forestal dete to outati che th



#include<stdio.



Read Input from STOIN



19 int main()



20- ( 21 22 23 3



11 Write your code here return p



I



21°C Rain showe

Communication Technologies have influenced history. Even




now, ICT is playing a big role. To have a creative take on the topic, compose a poem inspired by




current issues, changes, or trends we are exposed to because of ICT. Write your poem on the




space provided.

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS