Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Okay, my code works 70% right now. However, my inputs keep screwing up. We aren\

ID: 3656052 • Letter: O

Question

Okay, my code works 70% right now. However, my inputs keep screwing up. We aren't supposed to need ASCII for this program, but I can't think of a way without it while following the problem specifications. Can anyone help? Write a C++ program that asks for two lowercase characters. Pass the two entered characters, using pointers, to a function named capit(). The capit() function should capitalize the two letters and return the capitalized values to the calling function through its pointer arguments. The calling function should then display all four letters **** ( By all four letters I mean it should return first the two un-capitalized and then the two capitalized)*** My code works, but it capitalizes all the outputs, when I only want the last two capitalized : / . Does anyone know how to do this having the output with the first two un-capitalized and the last two capitalized ( ex. I enter a b, it will display a a A B) Thanks, I'll rate answers!

Explanation / Answer

#include using namespace std; void capit(char ch1,char ch2,char *ch3,char *ch4) { *ch3 = ch1 - 32; *ch4 = ch2 - 32; } int main() { char ch1,ch2; coutch1; coutch2; char *ch3,*ch4; ch3 = new char(); ch4 = new char(); capit(ch1,ch2,ch3,ch4); cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote