139k views
3 votes
Write a program in Arduino IDE by using C++ and upload in EDVINO, creat two variables x and y. Intialize them with some value.Print "enter your name" on serial monitor if ( X>Y) else print "exit". Hint: Use If-else

User Ozman
by
5.3k points

2 Answers

5 votes
So I don’t really know this question so u can private chat with me or something cause I don’t know this lol
User Georges Legros
by
4.9k points
4 votes

Answer:

There's no clearly defined answer. Just follow the code I've written. I'm not fluent in C++, much more of JS or C#, but just follow this, hopefully you understand and you do your own homework next time.

Step-by-step explanation:

int x, y; //defines variables

char name;

cout << "Type a number: ";

cin >> x;

cout << "Type another number: ";

cin >> y;

cout<< "Whats your name?";

cin>>name;

If(x>y){

cout<<name;

}else{

cout<<"Exit";

}

User Bitsofinfo
by
4.8k points