subject
Computers and Technology, 05.05.2020 19:29 npatony

Write a function called countstuff () that takes as a parameter a character array, and returns an int. The prototype must be:
int countstuff (char s[]);
The array passed will be less than 1000 characters long. Your code should return a value indicating the number of uppercase characters, the number of lowercase characters, and the number of digits in the string. The number of uppercase characters should be returned in the millions places, the number of lowercase in the thousands places, and the number of digits in the units places (i. e. UUULLLDDD).

x=countstuff ("Space the final FRONTIER"); // x= 9012000
x=countstuff ("THERE ARE 4 LIGHTS"); // x=14000001
x=countstuff ("Send $1000 to Your Favorite ChArItY!!!"); // x=13012004

To force values into the millions, thousands, or units places, you can do something like
V = cntUp*1000000 + cntlow* 1000 + cntDigits

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
Whats are the different parts of no verbal comunication, especially body language?
Answers: 3
question
Computers and Technology, 23.06.2019 03:10
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
You know the right answer?
Write a function called countstuff () that takes as a parameter a character array, and returns an in...
Questions
question
Mathematics, 09.12.2019 15:31
question
Mathematics, 09.12.2019 15:31
question
Biology, 09.12.2019 15:31
Questions on the website: 13722359