1.11 If Else
#include <iostream>
using namespace std;
int main() {
int sayi = 10;
if (sayi > 5) {
cout << "Sayı 5'ten büyüktür." << endl;
} else {
cout << "Sayı 5'ten küçüktür veya eşittir." << endl;
}
return 0;
}#include <iostream>
using namespace std;
int main() {
int not = 85;
if (not >= 90) {
cout << "Not: A" << endl;
} else if (not >= 80) {
cout << "Not: B" << endl;
} else if (not >= 70) {
cout << "Not: C" << endl;
} else {
cout << "Not: D" << endl;
}
return 0;
}Last updated