#include <iostream>
#include <windows.h>
int main() {
std::cout << "Hello Kasper" << std::endl;
std::cout << "Starting to Load Datafiles" << std::endl;
int Load = 0;
while(Load<=100) {
std::cout << "\r" << Load << "%";
Sleep(100);
Load++;
}
if(Load=100) {
std::cout << " -Datafiles was Loaded!" << std::endl;
}
std::cout << "Starting to export files" << std::endl;
int Load1 = 0;
while(Load1<=100) {
std::cout << "\r" << Load1 << "%";
Sleep(200);
Load1++;
}
if(Load=100) {
std::cout << " -files were exported!" << std::endl << std::endl;
}
int cpass;
std::cout << "Enter Password:";
std::cin >> cpass;
if(cpass=1){
std::cout << "You are sucessfully logged in" << std::endl;
}else{
std::cout << "HACKER! SHUTTING DOWN!" << std::endl;
return 0;
}
system("pause");
return 0;
}
int cpass;
std::cout << "Enter Password:";
std::cin >> cpass;
if(cpass=1){
std::cout << "You are sucessfully logged in" << std::endl;
}else{
std::cout << "HACKER! SHUTTING DOWN!" << std::endl;
return 0;
}
system("pause");
return 0;
}
anden kode er hvad jeg har problemmer med, lige meget hvad jeg inputter i konsollen som password acceptere den det som 1
hvad har jeg gjort forkert ?