Declare k, d, and s so that they can store an integer, a real number, and a smal
ID: 3634834 • Letter: D
Question
Declare k, d, and s so that they can store an integer, a real number, and a small word (under 10 characters). Use these variables to first read in an integer, a real number, and a small word and print them out in reverse order (i.e., the word, the real, and then the integer) all on the same line, separated by at least one space from each other. The print them out in the original order (the integer, the real, and the word), again, all on the same line, separated by at least one space from each other.Explanation / Answer
#include int main() { int k; float d; string s; cin>>k; cin>>d; cin>>s; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.