Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- int main(int argc, char *argv[])
- {
- int x;
- cout << "Indtast en værdi: ";
- cin >> x;
- if (x <= 45)
- {
- cout << "Spændingen er 4,7v" << endl;
- }
- if (x > 45 && x <= 60)
- {
- cout << "Spændingen er 5,0v" << endl;
- }
- if (x > 60 && x <= 100)
- {
- cout << "Spændingen er 5,2v" << endl;
- }
- if (x > 100)
- {
- cout << "Slukker systemet" << endl;
- return 0;
- }
- system("Pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement