+ 1
Is it possible to make a table using the for loop?
I wondering if there was a way to display a table using the for loop. I want to make a temperature conversion table using Fahrenheit and Centigrade but I only learned how to make the Fahrenheit side work okay. How do I get the Centigrade side to display next to the Fahrenheit side? Edit: I need an example. I’m back to square one. I want my code to look like this below: ⬇️ Fahrenheit Centigrade 32 0
5 Respuestas
+ 6
Yes. You want to print both together on each line somthing like
Print "fahrenheit"+" "+"Centigrade"
Print. "32"+" "+"0"
If you get stuck ill make an example for you 👍
+ 1
Have a look at printf
http://www.cplusplus.com/reference/cstdio/printf/
0
Thank you! :) I’ll try it now.
0
Also one more question, is the code written out as cout << “fahrenhiet”+” +”Centigrade” << endl; ?
0
Is printf a variable for something? I haven’t learned anything about that yet.