Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
aggiungi esercizi per lezione 4
Browse files Browse the repository at this point in the history
  • Loading branch information
mc-cat-tty committed Sep 30, 2021
1 parent 31a2fa0 commit 57adeae
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
Binary file modified esercitazioni/a.out
Binary file not shown.
12 changes: 12 additions & 0 deletions esercitazioni/stampa_1_se_in_intervallo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <iostream>

using namespace std;

int main() {
int a, b, x;
cout << "Inserisci a, b, x: ";
cin >> a >> b >> x;
cout << "a<=x<=b? " << ((a<=x) && (x<=b)) << endl;
return 0;
}

10 changes: 10 additions & 0 deletions esercitazioni/stampa_bool.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <iostream>
using namespace std;

int main() {
bool a = true;
cout << "Valore vero: " << a << endl;
a = false;
cout << "Valore falso: " << a << endl;
return 0;
}
11 changes: 11 additions & 0 deletions esercitazioni/stampa_logica_composta.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <iostream>
using namespace std;

int main() {
int a, b, c;
cout << "Inserisci valori di a, b e c: ";
cin >> a >> b >> c;
cout<< "a<b oppure b<c "
<< (a<b || b<c) << endl;
return 0;
}
10 changes: 10 additions & 0 deletions esercitazioni/stampa_logica_semplice.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <iostream>
using namespace std;

int main() {
int a, b;
cout << "Inserisci valori di a e di b: ";
cin >> a >> b;
cout << "Valore di " << a << "<" << b << ": " << (a<b) << endl;
return 0;
}

0 comments on commit 57adeae

Please sign in to comment.