2- Write a C++ program to check if the user enters an integer number and the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
2- Write a C++ program to check if the user enters an integer number and the print the square root of that integer. The user can enter any character and not only a digit (0,1.....9). The correct forms of integer numbers are: +500, -700, 15, 20. 3- Ask the user to enter the following statement: "I like programming in C++ because C++ is fun and challenging and there are plenty of resources online that I can learn from?" a- How many "C++" word in the statement? b- Delete "challenging" word from the statement. c- Delete '?' from the end of the statement. d- Add To the end of the statement. e- Replace the first "and" in the statement by "language". f- Save the word "resources" in a new string. g- How many characters in the string? h- Are the first six characters in the statement equal to "I like"? i- Delete the entire statement. 2- Write a C++ program to check if the user enters an integer number and the print the square root of that integer. The user can enter any character and not only a digit (0,1.....9). The correct forms of integer numbers are: +500, -700, 15, 20. 3- Ask the user to enter the following statement: "I like programming in C++ because C++ is fun and challenging and there are plenty of resources online that I can learn from?" a- How many "C++" word in the statement? b- Delete "challenging" word from the statement. c- Delete '?' from the end of the statement. d- Add To the end of the statement. e- Replace the first "and" in the statement by "language". f- Save the word "resources" in a new string. g- How many characters in the string? h- Are the first six characters in the statement equal to "I like"? i- Delete the entire statement.
Expert Answer:
Answer rating: 100% (QA)
2 Write a C program to check if the user enters an integer number and the print the square root of that integer The user can enter any character and n... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Lamont Henri needs to plan and manage a local construction project. The following table describes the relationships between the activities that need to be completed: If using Crystal Ball, assume...
-
[1 Consider the augmented matrix 0 0 0 1 02-1 0 3 0 2 0 0 0 0 0 0 i. Which columns are the pivots and which columns are the free variables? ii. Write a solution for the system.
-
1. Insert a module and create a subroutine named Receipt(). Excel 2. Place a button with the name "Generate Receipt" that would link to this subroutine when clicked. Do the following parts from 3 to...
-
For five years, Chaple, an accountant licensed by the state of Georgia, provided accounting services to Roberts and several corporations in which Roberts was an officer and shareholder (collectively...
-
Oyster Bay Surfboards manufactures fiberglass surfboards. The standard cost of direct materials and direct manufacturing labor is $248 per board. This includes 35 pounds of direct materials, at the...
-
Explain how underwriters use the overallotment option in IPOs.
-
Segregation of duties is essential to good internal control. Increasingly, computer systems automatically authorize and record transactions, such as generating pur chase orders whenever the quantity...
-
Two different types of polishing solution are being evaluated for possible use in a tumble-polish operation for manufacturing interocular lenses used in the human eye following cataract surgery....
-
hiring a celebrity to endorse a product is most likely an attempt to enhance; percieved quality, reliability quality, aesthetic quality, conformance quality, performance quality
-
Which series has the highest beta. BraveNewCoin Liquid Index for Bitcoin 1D BNC Trading Brave Ne Yellow Green Blue Orange
-
1. Sylvia Company has a long-term plant asset with the following information at the end of the year: Net book value $87,300 Estimated future cash flows $69,000 fair value $67,000 What is the amount...
-
What resources would you need to have or acquire to have the type of venture you envision in terms of both mission and impact?
-
According to data selected from GSS in 2014, the correlation between y = email hours per week and x = ideal number of children is -0.0008. a. Would you call this association strong or weak? Explain....
-
Do you think your business has the potential to raise formal venture capital (hightech, highinnovation, highgrowth prospects, firstrate management team, etc.)? If so, when might you be ready for...
-
According to data obtained from the General Social Survey (GSS) in 2014, 1644 out of 2532 respondents were female and interviewed in person, 551 were male and interviewed in person, 320 were female...
-
Which aspects of your business should you keep inhouse and which should you outsource? How do you protect your competitive advantage?
-
19 D Apply Dijkstra's algorithm on the following directed graph. The source vertex is E. A 12 11 B C 87 898 23 23 43 35 E F 10 17 +
-
1. Using the information from Problem 16-4B, prepare a statement of cash flows for Lim Garden Supplies Inc. using the direct method of presenting cash flows from operating activities. 2. How does Lim...
-
Ken paid the following amounts for interest during 2012: Qualified interest on home mortgage...........................................$4,700 Auto loan...
-
Walter, a single taxpayer, purchased a limited partnership interest in a tax shelter in 1985. He also acquired a rental house in 2012, which he actively manages. During 2012, Walter's share of the...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family. The Incisors own a rental beach house in Hawaii. The beach house was rented for the full year during 2012...
-
Suppose that the pdf of y has a C -component mixture form, f ( y ) = j = 1 c j f j ( y ) , where = ( 1 , , C ) , j > 0 , j = 1 c j = 1 . The j are unknown mixing proportions whereas the...
-
Let ( y 1 i , y 2 i ) , i = 1 , , N , have a bivariate normal distribution with mean ( 1 , 2 ) and covariance parameters ( 11 , 12 , 22 ) and correlation coefficient . Suppose that all N...
-
Consider calculation of the MLE in the logit regression model when the only regressor is the intercept. Then E [ y ] = 1 / ( 1 + e ) and the gradient of the scaled log-likelihood function g ( ) =...
Study smarter with the SolutionInn App