Write a programe to check the overlapping of one string's suffix with the prefix of another string
Create a program that countsand displaysthe odd and even numbers among the ten(10)input values.Array Requirements:Use 3separate arraysforteninput values, evenand odd num
If you are trying to print a string, what happens if you leave out one of the quotation marks or both and why?
Create
a
program that will count and display the odd and even numbers among the
ten(10)
input
values
using a two
dimensional array.
Using the following chart
Sales
Commission
ratio
10%
15%
Less than 10000$
Greater than or equal
10000$ and less than
15000$
Greater than or equal 15000$
20%
Commission = sale * commission ratio
Sample Run:
enter the amount of your sales:
your commission is 1912.5
#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}