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

#include <iostream.h>

void main()

{

double temperature;

cout<<”Input Temperature :”;

cin>>temperature;

if (temperature>=80)

{cout<<”go swimming”;}

else if (temperature>=50)

{cout<<”go running”;}

else

{cout<<”stay inside”;}

}



Write a complete program that prompts the user for the radius of a sphere, calculates and prins the volume of that sphere. Use a function sphere volume that returs the results of the following expression: (4/3)*π*r3 which is equivalent to (4.0/3.0) *3.14159*pow(radius,3) in C++ code. Sample output Enter the length of the radius of your sphere: 2 volume of sphere with radius 2 is 33.5103


Suppose you are given a sequence of numbers as follows I, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144. .Now. you want to find the n number of the sequence i.e.. if you input n-7, program will give you output 13, for n=10, output=55. You MUST use dynamic programming technique to solve this problem and implement your solution in C language. What is the running time of your algorithm (write it in your text file).

There are two types of fishes in a pond, A and B.there are N fishes of type A numbered from 1 to N and M.the following two methods are adopted by the fishes of type A to satisfy their hunger.

1)E1:Fish of typeA(n1) eats the fish of type B(n2).

2)E2:Fish of type A(n1) eats the fish of type A(n2) if size(n1)>size(n2).

In the above mentioned context,E1and E2 denote the respective methods and n1 and n2 are the fishes belonging to these types and Size(X) denotes the total number of fish within X.

Example:if size(L)=3 and size(K)=2 and L eats K then the resulting size(L) will be5.

It is feeding time now and the fishes are hungry.theyeat as per the given method and satiate their hunger.your task is to find and return an array defining whether which type A fishes do All type B fishes fall under.

Note: the size of all fishes initially is the same i.e,1.

Ex1:

i/p1:2

i/p2:3

i/p3:4

i/p4:{{1,1,1},{1,1,2},{1,2,3},{2,1,2}}

o/p:{1,1,1}

ex2:

i/p1:1

i/p2:1

i/p3:1

i/p4:{{1,1,1}}

o/p:{1}


Suppose you are given a sequence of numbers as follows 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144. .Now. you want to find the n number of the sequence i.e.. if you input n-7, program will give you output 13, for n=10, output=55. You MUST use dynamic programming technique to solve this problem and implement your solution in C language. What is the running time of your algorithm (write it in your text file).

There are infinite number of identical photons these photons are placed into containers say nodes numbered from 1 with the first container being the root node.




The kth node has two children i.e,left and right child numbered as 2*k and 2*k+1 respectively. When you throw a heat wave at a photon present at some node,it starts vibrating and producing light of intensity -1.the vibration of this photon affects all the other photons as well.




As you go awayfrom this node the intensity of light produced by photons at various nodes decreased by 1 with each passing node due to their increased distance from the photon that was hit by the light wave initially,all the photons are stable i.e, no vibration and hence they produce no light.



Ex1:



I/p1:1



i/p2:2



o/p:-2



explanation :the first node will produce light with intensity -1 and node 2 will produce -2 because it is the neighboring node of 1.




Ex2:



i/p1:2



i/p2:3



o/p:-3





Search Game



A grid of letters may contain a word hidden somewhere within it. The letters of the word may be traced from the starting letter by moving a single letter at a time, up, down, left or right. For example, suppose we are looking for the word BISCUIT in this grid:






2






B



T



1



U



A



C



2



S



V



D



N



The word starts in the top left corner, continues downwards for 2 more letters, then the letter to the right followed by 2 letters moving upwards, the final letter at the right of the penultimate one.



Write a program in which we give target word and a grid of letters as input returns a list of tuples, each tuple being the row and column of the corresponding letter in the grid (numbered from 0). If the word cannot be found, output the string Not present

11. The battery life of a certain battery is normally distributed with a mean of 90 days and a standard deviation of 3 days.

For each of the following questions, construct a normal distribution curve and provide the answer.

a)    About what percent of the products last between 87 and 93 days?

b)    About what percent of the products last 84 or less days?

For each of the following questions, use the standard normal table and provide the answer.

c) About what percent of the products last between 89 and 94 days?

d) About what percent of the products last 95 or more days? 




Suppose you are given 1000 unordered integer numbers ranging from 10-100. Now you have to sort these numbers decreasing order. Implement a suitable sorting algorithm which would take lesser time in C language. Your program would take these 1000 numbers from the user and gives output of these 1000 numbers but in sorted order. Write a short note on why you have chosen your algorithm to solve this problem.

Create an OOP Java program that will ASK the user for the Prelim, Midterm, Prefinal, and Finals grades. Calculate for the FINAL GRADE (follow the calculation instructions below). Display the final grade on the console.





Calculation for Final Grade:



Get the 20% of the Prelim Grade.



Get the 20% of the Midterm Grade.



Get the 20% of the Prefinal Grade.



Get the 40% of the Finals Grade.



Add all four results. This will be the Final Grade.







1. Create two (2) classes: MyMainClass and SecondClass.




2.The class SecondClass has 5 double attributes: prelim, midterm, prefinal, finals.




3.Create one (1) constructor method to set the prelim, midterm, prefinal, and finals grades.




4.Create one (1) accessor method to calculate for and return the final grade output.




Display the final grade output in the MyMainClass.





Sample output:



Enter prelim grade:75



Enter the midterm grade: 80



Enter the prefinal grade: 90



Enter the final grade: 91



Your final grade is 85.4

LATEST TUTORIALS
APPROVED BY CLIENTS