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

The FizzBuzz Game





by CodeChum Admin





Let's play a game of FizzBuzz! It works just like the popular childhood game "PopCorn", but with rules of math applied since math is fun, right?






Just print out "Fizz" when the given number is divisible by 3, "Buzz" when it's divisible by 5, and "FizzBuzz" when it's divisible by both 3 and 5!






Let the game begin!






We want to calculate the total marks of each student of a class in Physics,Chemistry and





Mathematics and the average marks of the class. The number of students in the class are entered





by the user. Create a class named Marks with data members for roll number, name and marks.





Create three other classes inheriting the Marks class, namely Physics, Chemistry and





Mathematics, which are used to define marks in individual subject of each student. Roll number





of each student will be generated automatically.






. Negative Decimal Tally by CodeChum Admin


We've been giving positive numbers too much attention lately, it's time to let negative numbers take the spotlight this time!


Instructions:


Input four float numbers; they could be positive or negative.


Only add all inputted negative numbers, and print its sum, up to 2 decimal place.


Hint: The previous/latest topic is about if-else-elseif statements, but do we need one here?


Instructions

Input four decimal numbers, they could be positive or negative.

Add all the negative numbers, and print the sum, up to 2 decimal places.


Input

A line containing four decimals/floats separated by a space.


-30.22·10.5·-2.2·-1.8


Output

A line containing a negative decimal/floats with two decimal places.


-34.22


2. Write a program which creates a class named babyRecord with four methods.

a) One method will be used to write details of a child including date of birth, name, parent

names and hospital name into a file called baby_data.txt.

b) The second method will be used to read from the file baby_data.txt and store the data in a

dictionary called records.

c) The third method will be used to search for a baby using baby name or parent names

information in the file called baby_data.txt.

d) The last method will be used to delete records in the dictionary and file respectively.

e) Clearly show how exceptions are handled in your program in each method.


Make a Fraction class having member data as the fraction’s numerator and denominator where both are type int. Member functions should accept input from the user in the form 3/5, and output the fraction’s value in the same format. Another member function should add two fraction values. Write a main () function that allows the user to repeatedly input two fractions and then displays their sum. After each operation, ask whether the user wants to continue.


C++ program that prompts a user to specify a text through the keyboard repeatedly and only terminates when a user enters the text "goodbye" else the program should continue prompting a user to enter a text


A university's library has been having electricity issues and students have been struggling to study during nights.


Each light source can illuminate a circle with a radius of r, and there are n tables in the library and the ith table is positioned at point (xi, yi). You have to help the university find the minimum number of light sources (k), such that each table is illuminated by at least 1 light source.



Input format


• The first line contains integers n and r respectively.


• In each of the next n lines, there are two integers representing xi and yi respectively that display the position of the ith table.


Output format


• In the first line of output, print an integer k that represents the number of light sources.


• In each of the next k lines, print two decimal numbers representing xi, yi respectively that shows the location of the ith light source.


https://drive.google.com/file/d/1wWA7nKnFWaG5XgtzzLPymfbuqiIf7WH8/view?usp=sharing




If an input is “General” then the output should be G_e_n_e_r_a_l



please can u solve this type code


the first output pattern of the code is

1:

[3spaces] ***

[2spaces] **

[1space] *


and

2: if input is [20 or 34 or any double digit like 87] then it should be 8+7 = 15 and 1+5 = 6 this type number reduction


We've already done looping through a series of numbers and printing out its squares, so how about we level it up and go with cubes this time?


I have a condition though; I don't want to be associated with numbers that are divisible by 3 or 5 so if an integer is divisible by either of the two, don't make their cube values appear on the screen, please.


Care to fulfill my request?


Instructions:

  1. Print out the cube values of the numbers ranging from 1 to 1000 (inclusive). However, if the number is divisible by either 3 or 5, do not include them in printing and proceed with the next numbers.
  2. Tip: When skipping through special values, make use of the keyword continue and put them inside a conditional statement.
LATEST TUTORIALS
APPROVED BY CLIENTS