Thursday, September 15, 2016

Comparing and Contrasting the four variable types

The four variable types are: bool,char,double and int. Bools make a statement true of false, int is for plain numbers and decimals, char holds characters, and double holds decimals and bigger numbers. The similarity of int and double is that they both hold numbers to be on screen. The difference between the two is that the double variable is that it holds bigger numbers while the int variable holds smaller numbers and decimals. Another similarity between all of the variables is that they all hold a number or letters to print different things. The difference between bool and char is that bool prints a certain line of text to the screen and char just holds a character to be used.

No comments:

Post a Comment