C++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

C++

Write a program in C++ with the following datatypes. Use the 3 different variables with the same data type. Explain the codes step by step. a. int b. float. c. double. d. string. e. bool.

22nd Dec 2021, 11:53 AM
Abbey Abbey
8 Answers
+ 5
Well, then write a program? If you have a particular question, just ask it directly!
22nd Dec 2021, 12:12 PM
Lisa
Lisa - avatar
+ 1
Abbey Abbey You're not gonna get code here, this section has been made to help/explain. You have to write it yourself and then you can ask if you don't know how does the code work, or something does not work properly
23rd Dec 2021, 3:01 AM
Michal Doruch
+ 1
Solomoni Railoa tnx man k didn’t know there was a rule and secondly l jxt started learning on dis app Lisa and others am sorry l didnot get u
23rd Dec 2021, 11:00 PM
Abbey Abbey
0
Lisa Well that is why l posted it to get answers .. FYI it is a question
23rd Dec 2021, 12:17 AM
Abbey Abbey
0
bool is_hit (acc>dodge); if(is_hit ){ cout<<"you were hit for "<<dmg<<endl; } does this need explanation?
23rd Dec 2021, 12:12 PM
Drelda
Drelda - avatar
0
😂
23rd Dec 2021, 10:02 PM
Amber Singh Rathour Pandey
Amber Singh Rathour Pandey - avatar
0
Michal Doruch alryt boss sorry l dont no hw things works hr
23rd Dec 2021, 11:02 PM
Abbey Abbey
0
Are you asking that the program let say take a user input say a string print it back as a string and then below that it prints it out as it is converted to int, then to a float and double. The bool will have to be a check to see if it is a string which will print back true or false.
24th Dec 2021, 7:12 AM
Adriaan Naudé
Adriaan Naudé - avatar