Radioactive decay of radioactive materials can be modeled by the equation A = A0e−t(log2/h) where A is amount of material at time t, A0 is the material at time 0, and h is the half-life of the radio active material.
Technetium-99m is a radioisotope that is used in imaging of the brain. It has a half-life of 6 hours. Your program should display the relative amount of A/A0 in a patient body every hour for 24 hours after receiving the a dose. Prompt user for the initial dose (A0) in millicuries (mci). Typical values range from 3.8 - 15 millicuries. However, you can use any value for this program. Even milligrams. Enter values without negative exponents. If you want to enter 15 milligrams, enter 15. Same, for millicuries.
Display your results in a table, the first column showing hours beginning at 0, and ending at 24. The second column shows the ratio of A/A0 beginning at hour 0 when the ratio is 1.
Make sure that only positive values are entered for the initial dose using a do/while loop.
Radioactive decay of radioactive materials can be modeled by the equation A = A0e−t(log2/h) where A is amount of material at time t, A0 is the material at time 0, and h is the half-life of the radio active material.
Technetium-99m is a radioisotope that is used in imaging of the brain. It has a half-life of 6 hours. Your program should display the relative amount of A/A0 in a patient body every hour for 24 hours after receiving the a dose. Prompt user for the initial dose (A0) in millicuries (mci). Typical values range from 3.8 - 15 millicuries. However, you can use any value for this program. Even milligrams. Enter values without negative exponents. If you want to enter 15 milligrams, enter 15. Same, for millicuries.
Display your results in a table, the first column showing hours beginning at 0, and ending at 24. The second column shows the ratio of A/A0 beginning at hour 0 when the ratio is 1.
Make sure that only positive values are entered for the initial dose using a do/while loop
1. Write an pseudo code and flowchart.
A. Receive 3 numbers and display them in. ascending order from smallest to largest.
B. Add the even numbers between 0 and any positive integers number given by the user.
C. Read 10 integers from the keyboard in the range 0-100, and count how many of them are larger than 50, and display this result.
D. Take an integer from the user and display the factorial of the number.
5 students going to submit their fee in a bank, they are in a line in front of the fee submission counter. After the submission of 3 students, 2 more students came and stand in that line. Your task to implement this scenario with a suitable algorithm.
1. All the banks operating in India are controlled by RBI. RBI has set a well defined guideline (e.g. minimum interest rate, minimum balance allowed, maximum withdrawal limit etc) which all banks must follow. For example, suppose RBI has set minimum interest rate applicable to a saving bank account to be 4% annually; however, banks are free to use 4% interest rate or to set any rates above it.
Write a program to implement bank functionality in the above scenario. Note: Create few classes namely Customer, Account, RBI (Base Class) and few derived classes (SBI, ICICI, PNB etc). Assume and implement required member variables and functions in each class.
String Ending with Vowel
Given an array of vowels in the prefilled code and a string
inputString as an input, write a JS program to check whether the inputString ends with a vowel.
Quick Tip
You can use the string methods toUpperCase() and endsWith().
Sample Input 1
Five
Sample Output 1
true
Sample Input 2
Apples grow best where there is cold in winter
Sample Output 2
false
Submarine
Given two numbers
totalTorpedos, torpedosFired as inputs, write a super class Submarine with property and methods as below,PropertyDescription
The sequence of operations is,
Sample Input 1
5
2
Sample Output 1
Submarine Submerged
2 Torpedos Fired, 3 Left
Submarine Surfaced
Sample Input 2
10
2
Sample Output 2
Submarine Submerged
2 Torpedos Fired, 8 Left
Submarine Surfaced
Triplet Sum
Given an array n integers, find and print all the unique triplets (a, b, c) in the array which give the sum K. (a+b+c=K).
Input
The first line of the input will be space separated integers, denoting the elements of the array. The second line of the input will be an integer denoting the required sum K
Output
The output should be multiple lines, each line containing a unique triplet. The elements of the triple must be sorted in increasing order and all the triplets printed must be sorted in increasing order. Print "No Matching Triplets Found" if there are no triplets with the given sum.
Explanation
When the given array is [0, 1, 2, 3, 5, 7, 13, 17, 19, 19] and the required sum is 22, the triplets (0, 3, 19), (0, 5, 17), (1, 2, 19), (2, 3, 17) and (2, 7, 13) have the given sum 22.
Sample Input 1
0 12 17 8 9 21
29
Sample Output 1
(0, 8, 21)
(0, 12, 17)
(8, 9, 12)
Sample Input 2
0 1 2 3 5 7 13 17 19 19
22
Sample Output 2
(0, 3, 19)
(0, 5, 17)
(1, 2, 19)
(2, 3, 17)
(2, 7, 13)
Non-Adjacent Combinations of Two Words
Given a sentence as input, find all the unique combinations of two words and print the word combinations that are not adjacent in the original sentence in lexicographical order.
Input
The input will be a single line containing a sentence.
Output
For example, if the given sentence is "python is a programming language", the possible unique combination of two are (a, is), (a, language), (a, programming), (a, python), (is, language), (is, programming), (is, python), (language, programming), (language, python), (programming, python).
a python
is language
is programming
language python
programming python
Sample Input 1
raju always plays cricket
Sample Output 1
always cricket
cricket raju
plays raju
Sample Input 2
python is a programming language
Sample Output 2
a language
a python
is language
is programming
language python
programming python
Sample Input 3
to be or not to be
Sample Output 3
be be
be not
or to
to toNon-Adjacent Combinations of Two Words
Given a sentence as input, find all the unique combinations of two words and print the word combinations that are not adjacent in the original sentence in lexicographical order.Input
The input will be a single line containing a sentence.Output
The output should be multiple lines, each line containing a valid unique combination of two words. The words in each line should be lexicographical order and the lines as well should be in lexicographical order. A valid combination will not contain the words that appear adjacent in the given sentence. Print "No Combinations" if there are no valid combinations.Explanation
For example, if the given sentence is "python is a programming language",
So the output should be
a language
a python
is language
is programming
language python
programming python
Sample Input 1
raju always plays cricket
Sample Output 1
always cricket
cricket raju
plays raju