Using C language, and describe the algorithm
design
All the sample is correct
Tim was born in a leap year, so he would like to know when he could have his birthday party. Could you tell him? Given a positive integers Y indicating the starting year, and a positive integer N, your task is to tell the N-th leap year from year Y. Note: if year Y is a leap year, then the 1st leap year is year Y.
The input contains several test cases. The first line of the input is a single integer T which is the number of test cases. T test cases follow. Each test case contains two positive integers Y and N(1<=N<=10000). For each test case, you should output the Nth leap year from year Y.
3
2005 25
1855 12
2004 10000
2108
1904
43236
In: Computer Science
Transformational Leadership - List one organizational situation when this style will be Inappropriate/destructive?
In: Operations Management
Effective communication among teams is often understood within the framework of social exchange theory. Describe this theory, and list two key characteristics in a social exchange interaction.
In: Psychology
In: Chemistry
A psychologist wants to determine if aging has an impact on
depression. It is known that the general population scores a 41 on
a standardized depression test where a higher score indicates more
depression. The psychologist obtains a sample of individuals that
are all over 67 years old. What can the psychologist conclude with
an α of 0.01? The data are below.
id |
depression score |
|---|---|
| 2 6 8 12 3 4 11 19 5 6 |
76.1 44.9 72.5 42.2 30.1 67.6 51.3 36.5 54.3 47.2 |
a) What is the appropriate test statistic?
---Select--- na z-test One-Sample t-test Independent-Samples t-test
Related-Samples t-test
b)
Population:
---Select--- aging standardized depression test depression elderly
general population
Sample:
---Select--- aging standardized depression test depression elderly
general population
c) Compute the appropriate test statistic(s) to
make a decision about H0.
(Hint: Make sure to write down the null and alternative hypotheses
to help solve the problem.)
p-value = ; Decision: ---Select---
Reject H0 Fail to reject H0
d) Using the SPSS results,
compute the corresponding effect size(s) and indicate
magnitude(s).
If not appropriate, input and/or select "na" below.
d = ; ---Select--- na trivial
effect small effect medium effect large effect
r2 = ; ---Select--- na
trivial effect small effect medium effect large effect
e) Make an interpretation based on the
results.
The elderly are significantly more depressed than the population.
The elderly are significantly less depressed than the population.
The elderly did not significantly differ on depression than the population
In: Math
It seems to be very common sense to not have HR practices that are competing with one another. Why does this happen and what would be your recommendations to managers to try to avoid this scenario?
Provide examples from your work experiences in which incongruent HR practices existed. What was the impact on performance, motivation, and turnover?
In: Operations Management
P3-6 (Algo) Analyzing the Effects of Transactions Using T-Accounts, Preparing an Income Statement, and Evaluating the Net Profit Margin Ratio LO3-4, 3-5, 3-6
[The following information applies to the questions displayed below.]
Following are account balances (in millions of dollars) from a recent StateEx annual report, followed by several typical transactions. Assume that the following are account balances on May 31 (end of the prior fiscal year):
| Account | Balance | Account | Balance | |||
| Property and equipment (net) | $ | 18,694 | Receivables | $ | 2,749 | |
| Retained earnings | 14,406 | Other current assets | 1,119 | |||
| Accounts payable | 1,737 | Cash | 1,364 | |||
| Prepaid expenses | 348 | Spare parts, supplies, and fuel | 878 | |||
| Accrued expenses payable | 2,550 | Other noncurrent liabilities | 4,010 | |||
| Long-term notes payable | 1,970 | Other current liabilities | 2,419 | |||
| Other noncurrent assets | 3,272 | Additional Paid-in Capital | 1,327 | |||
| Common stock ($0.10 par value) | 5 | |||||
These accounts are not necessarily in good order and have normal debit or credit balances. Assume the following transactions (in millions, except for par value) occurred the next fiscal year beginning June 1 (the current year):
P3-6 Part 2
2. Prepare T-accounts for the current year from the preceding list; enter the ending balances from May 31 as the respective beginning balances for June 1 of the current year. For each transaction, record the current year's transaction effects in the T-accounts. Label each using the letter of the transaction. (Enter your answers in millions, not in dollars.)
In: Accounting
What are Robert J. Sternberg's (in "Construct Validation of a Triangular Love Scale") three components of intimate relationships? Is it necessary for all three to be present in an intimate relationship? How do relationships that vary on these components differ from each other?
In: Psychology
3. What does mystery2 compute on an input n? Please explain how you found this. thanks!
public static int problem1(int n) {
int begin = 0;
int end = n+1;
while (begin+1 < end){
int mid = (begin+end)/2;
if(112*mid <= n){
begin = mid;
}
else{
end = mid;
}
}
return begin;
}
In: Computer Science
essay on test anxiety for foundation students. Symptoms
In: Psychology
What does the following PHP code accomplish?
1. function validateInput ( $data ) {
2. $data = trim ( $data );
3. $data = stripslashes ( $data );
4. $data = htmlspecialchars ($data , ENT_QUOTES | ENT_HTML5 ,'UTF -8 ');
5. return $data ;
6. }
In: Computer Science
GAMEMODE(gamemode_id, gamemode_name,
gamemode_type)
GAME(game_id, game_time, game_results, game_date,
gamemode_id)
ACTIVEPLAYER(player_online_status, game_id,
hero_level)
PLAYERHERO(hero_level, hero_id, player_id)
HERO(hero_id, hero_role, hero_price, hero_name,
hero_speciality)
SKIN(skin_id, skin_price, skin_name, hero_id)
PLAYER(player_email, player_username,
player_id)
PLAYER
ACCOUNT(player_id,player_username,player_onlinestatus,player_battle_point,player_global_level,player_diamonds)
Normalise this to 3NF
In: Computer Science
ABC drug company has hired you as a consultant to hire the following positions:
ABC wants you to independently develop the job specification (KSAOs) of the jobs, and submit a proposal as how you would like to recruit, screen and then conduct employment testing prior to the final employment interview.
Instruction: for any four job of your choice from the above list and prepare the following:
(if you are not sure about the job description and specification of your picked job, you can do some research in the internet using NOC, O*Net or other available resources. These specifications may vary from student to student. Its ok)
Based on your developed job specification (KSAOs) and course learning (lecture, text, class activities) answer the following:
In: Operations Management
In mathematics, the notation n! represents the factorial of the nonnegative integer n. The factorial of n is the product of non-negative numbers from 1 to n.
Design a program that asks the user to enter a nonnegative integer and then displays the factorial of that number.
Module main. Asks the user to enter a non-negative integer. A loop is used to require user input until a nonnegative number is entered. Once a nonnegative number is entered, the integer is passed to Module factorial.
Module factorial. Accepts a non-negative integer from Module main and uses a loop to calculate the factorial of that number. The number resulting from each step of the calculation will be written to an output file products.dat. The following numbers would be written to the output file for 7!
42
210
840
2520
5040
Module readFactorial. Changes the status of products.dat to an input file. Reads and displays all numbers in the file. The final number should be labeled as the solution to the problem.
Expected Input/Output
Your results should be similar to the following:
Please enter a non-negative integer: -5
The number must be non-negative.
Please enter a non-negative integer: 0
The number must be non-negative.
Please enter a non-negative integer. 7
Following are intermediary calculations for 7 factorial:
42
210
840
2520
5040
7 factorial is 5040.
Please use java to generate the program. And must have these modules and use these guidelines!!!
In: Computer Science
Please answer ASAP
Database
Consider the following relation scheme:
Players = {name, position, year, team, manager}
We use the following abbreviations:
Players = {n, p, y, t, m}
with the following FDs
n --> p
n, y --> t
t, y --> m
(3.a) Is Players in BCNF? Explain why.
(3.b) Find all candidate keys of Players. Show your work.
(3.c) Obtain a decomposition of players using the 3NF decomposition
algorithm. Assume the
given FDs are a minimal (canonical) cover. Show your work.
(3.d) Assume the following FD also holds in players (in addition to
the FDs listed above).
t, m ! y
Find all candidate keys of Players for this case. Show your
work.
In: Computer Science