90 219
Assignments Done
99.4%
Successfully Done
In September 2020

Answer to Question #5906 in Action Script | Flash | Flex | ColdFusion for aini

Question #5906
In the following questions, use functions to implement the required tasks:
===========================================================
Q1:- Write a C++ code that read a string as an integer, then it will check it for any mistakes, then it will convert it to integer so you can use it in any arithmetic or logic operations. in this C++ code, to Program should give the user an error message when wrong entry is happen, and the program should keep asking the user to enter a valid entry. Also, use a function to implement the converting. (Use switch for the converting)

Q2:- Write a function Exaggerate that takes a string as a reference parameter and increases any non-nine digits in that string by one. For example, given the input string &ldquo;I worked 90 hours and drove 24 miles&rdquo; the function would change it to read &ldquo;I worked 91 hours and drove 35 miles.

Q3:- Write a function InsertCommas that, given as a parameter a string containing mixed integer data and text, inserts commas into the integers to improve readability. For example, if the input is &ldquo;1000000 melons,&rdquo; you should return &ldquo;1,000,000 melons.&rdquo;

Q4:- Write a C++ code that read 10 different integers as a one dimension array and:
&bull; Calculate the average of these values.
&bull; Find the maximum value.
&bull; Sort them from the smallest value to the greatest value.

Q5:- Write a program that declares a constant pointer to a constant integer. Initialize the pointer to an integer variable, varOne. Assign 6 to varOne. Use the pointer to assign 7 to varOne. Create a second integer variable, varTwo. Reassign the pointer to varTwo.

Q6:- Write a program that declares an int, a reference to an int, and a pointer to an int. Use the pointer and the reference to manipulate the value in the int.

Q7:- What is wrong with this code?
#include &lt;iostream&gt;
using namespace std;
int main()
{
int *pInt;
*pInt = 9;
cout &lt;&lt; &ldquo;The value at pInt: &ldquo; &lt;&lt; *pInt;
return 0;
}

6. What is wrong with this code?
#include &lt;iostream&gt;
using namespace std;
int main()
{
int SomeVariable = 5;
cout &lt;&lt; &ldquo;SomeVariable: &ldquo; &lt;&lt; SomeVariable &lt;&lt; endl;
int *pVar = & SomeVariable;
pVar = 9;
cout &lt;&lt; &ldquo;SomeVariable: &ldquo; &lt;&lt; *pVar &lt;&lt; endl;
return 0;
}
1
2012-01-06T09:09:02-0500
Submit it with all requirements as an assignment to our control panel and we&#039;ll assist you.

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!