Ik ben al zo 5 jaar bezig maar Codering C++ Openscource ik weet mijn weg erin te vinden
hier voor jullie wat easy begin codes
deze kunnen gebruikt worden in het programma Dev-C++ een gratis programma
Hier te downloaden http://www.bloodshed.net/dev/devcpp.html
hier voor jullie wat easy begin codes
deze kunnen gebruikt worden in het programma Dev-C++ een gratis programma
Hier te downloaden http://www.bloodshed.net/dev/devcpp.html
Code:
#include <iostream>
#include <windows.h>
using namespace std;
int main() {
string password;
cout << "This program reguires a passowrd: ";
if (password == "mpcforums") {
cout << "\n Welcome to the Program!";
}
else {
cout << "\n wrong Passowrd! **** Off!/n Exiting progrma in 5 seconds";
Sleep(5000)
return 0;
}
system("pause>nul");
return 0;
}
Code:
#include <iostream>
#include <windows.h>
#include <winable.h>
using namespace std;
int main (void]
{
string password;
count << "Enter password to acces program";
getline (cin, password);
if(password == "thecode")
)
{
string answer;
system("CLS");
cout << "Welcome Back Kid";
sleep(2000)
cout << "\nJow have you been in?\n";
getline (cin, answer);
if(answer == "bad")
(
cout << "Sorry to hear that.";
)
else
{
cout << "Glad to hear that!";
)
)
else
{
BlockInput(true);
system("CLS");
cout << "Incorrect passsword, now closing!";
sleep(3000)
return 0;
)
system("PAUSE>nul");
returon 0;
}
Code:
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
double age = 0;
cout << "Enter your age: ";
cin >> age;
if(age < 50 )
{
cout << "You are very young" << endl;
}
if(age > 50)
{
cout << "You're old" << endl;
}
system("PAUSE");
return 0;
}