Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

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

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().

Input

  • The input will be a single line containing a string inputString

Output

  • The output should be a single line containing a boolean value

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,

  1. Submerge the Submarine
  2. Fire torpedos
  3. Surface the Submarine

Input

  • The first line of input contains a number totalTorpedos
  • The second line of input contains a number torpedosFired

Output

  • The first line of output is a string with Submarine Submerged text
  • The second line of output is a string with the number of torpedos fired and left, as shown in sample outputs
  • The third line of output is a string with Submarine Surfaced text

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 to

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


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




LATEST TUTORIALS
APPROVED BY CLIENTS