Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- int nitzav1 = 3;
- int nitzav2 = 4;
- int yeter = 5;
- int max;
- Serial.begin(9600);
- if (yeter > nitzav1) {
- if (yeter > nitzav2) {
- max = yeter;
- }
- else {
- max = nitzav2;
- }
- }
- else {
- if (nitzav1 > nitzav2) {
- max = nitzav1;
- }
- else {
- max = nitzav2;
- }
- }
- Serial.print("The longest side is:");
- Serial.println(max);
- }
- void loop() {
- }
Advertisement
Add Comment
Please, Sign In to add comment