Skip to content

Instantly share code, notes, and snippets.

@esmarr58
Created November 27, 2017 03:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esmarr58/7d79921c8dc0aa6f3cd00f1f350e799f to your computer and use it in GitHub Desktop.
Save esmarr58/7d79921c8dc0aa6f3cd00f1f350e799f to your computer and use it in GitHub Desktop.
double numeroFlotante = 6.32;
double numeroRedondeado = 0.0;
void setup() {
Serial.begin(9600);
Serial.print("Numero flotante: ");
Serial.println(numeroFlotante,4);
Serial.print("Numero flotante con redondeo: ");
numeroRedondeado = round(numeroFlotante);
Serial.println(numeroRedondeado);
}
void loop() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment