what can a float store c# code example
Example 1: c# data types
// -------DATA TYPES ------- //
sbyte myNum = 1; // Smallest range of integer numbers
uint myNum = 3; // Only positive integer numbers
short myNum = 4; // Short range of integer numbers
int myNum = 5; // Integer (whole numbers)
long myNum = 10; // Biggest range of integer numbers
float myFloat = 1.2f; // Smallest range of floating point numbers
double myDoubleNum = 5.99; // Big range of floating point numbers
decimal myDecimalNum = 2.2M; // Biggest precision in floating point numbers
char myLetter = 'D'; // Character
string myString = "Hello!" // Strings
bool myBool = true; // Boolean
Example 2: c# how to take from a float
public float NumberFloat = 10f;
public float TakeFloat = 10f;
// To take a float from another float:
NumberFloat = NumberFloat - TakeFloat;
// To take a number from a float:
NumberFloat = NumberFloat - 10f;
//Have a nice day, thanks for reading.