-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinteri.cpp
More file actions
59 lines (49 loc) · 1.06 KB
/
interi.cpp
File metadata and controls
59 lines (49 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <iostream>
using namespace std;
int main() {
const int ETA_MINIMA = 30;
const float REDDITO_MINIMO = 30000.0;
int eta;
float reddito;
cout<<"inserisci la tua eta':";
cin>>eta;
cout<<"inserisci il tuo reddito:";
cin>>reddito;
if (eta<ETA_MINIMA) {
cout<<"sei troppo giovane"<<endl;
return 0;
}
if (reddito<REDDITO_MINIMO){
cout<<"sei troppo povero"<<endl;
return 0;
}
cout<<"il prestito e' stato accettato"<<endl;
return 0;
}
// #include <iostream>
// using namespace std;
// int main() {
//
// unsigned short int eta;
// float reddito;
//
// cout<<"Inserisce la tua eta'";
// cin>>eta;
//
// cout<<"Inserisce il tuo reddito";
// cin>>reddito;
//
//
// cout<<reddito<<endl;
// if(eta<27)
// {
// cout<<"Sei troppo giovane!!!"<<endl;
// return 0;
// }
// if(reddito < 20000)
// {
// cout<<"il reddito e' troppo basso"<<endl;
// return 0;
// }
// cout<<"Hai diritto ad un prestito!!!"<<endl;
// }