wap in c++ which accept a integer array and its size as
argument and replaces element having even values with its
half and element having odd values with twice its value
Answer / ashish
void update(int arr[], int size)
{
for(int i =0;i<size;i++)
{
if(arr[i]%2) arr[i] *= 2;
else arr[i] /= 2;
}
}
| Is This Answer Correct ? | 14 Yes | 11 No |
What is 2*2?
write a program to search and display the position of an element in a single-dimentional array using function.
what's the difference between abstract class and concreate class? what's the meaning of standard template library(STL)?
How is stl different from c++ standard library?
What are the symptoms of stl?
i want a road rash 3d game code if some one know please help me
How Find, Replace and Go To commands ca be used to substitute one character string for another? Explain with the heIp of an example.
what is the acronym of the term 'C.O.M.P.U.T.E.R' ?
17 Answers Config Systems, Google, Wipro,
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command
If P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula: The population growth rate is given by the formula: B – D Write a program that prompts the user to enter the starting population, birth and death rates, and n, the number of years. The program should then calculate and print the estimated population after n years. Your program must have at least the following functions: 1. growthRate: This function takes its parameters the birth and death rates, and it returns the population growth rate. 2. estimatedPopulation: This function takes its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years Your program should not accept a negative birth rate, negative death rate, or a population less than 2. please answer my question ....
how to making game in c++ ?