The Time APP
Page 1 of 1 • Share
The Time APP
I know you guys probably already have this, which would be weird if you didn't but, here's the code.
#include <iostream>
#include <Windows.h>
using namespace std;
int main(){
int second = 0;
cout << second << endl;
Sleep(1000);
while (second >= 0){
second++;
cout << second << endl;
Sleep(1000);
}
return 0;
}
#include <iostream>
#include <Windows.h>
using namespace std;
int main(){
int second = 0;
cout << second << endl;
Sleep(1000);
while (second >= 0){
second++;
cout << second << endl;
Sleep(1000);
}
return 0;
}
CPSNAP
Re: The Time APP
Version.0.4
#include
#include
using namespace std;
int main(){
int second = 0;
int minute = second + 1 * 60;
int many = 0;
cout << second << endl;
Sleep(1000);
while (second >= 0){
second++;
cout << second << endl;
Sleep(1000);
if (second == minute){
minute = second + 60;
many++;
cout << "\t" << many << " minute(s) has passed.\n";
}
}
return 0;
}
#include
#include
using namespace std;
int main(){
int second = 0;
int minute = second + 1 * 60;
int many = 0;
cout << second << endl;
Sleep(1000);
while (second >= 0){
second++;
cout << second << endl;
Sleep(1000);
if (second == minute){
minute = second + 60;
many++;
cout << "\t" << many << " minute(s) has passed.\n";
}
}
return 0;
}
CPSNAP
Re: The Time APP
ehm, where does it print all the numbers?
pretty cool though, but it's a bit too easy to share imo
pretty cool though, but it's a bit too easy to share imo
lolslayer
Re: The Time APP
I'm working on a better one.lolslayer wrote:ehm, where does it print all the numbers?
pretty cool though, but it's a bit too easy to share imo
CPSNAP
Re: The Time APP
CPSNAP wrote:I'm working on a better one.lolslayer wrote:ehm, where does it print all the numbers?
pretty cool though, but it's a bit too easy to share imo
ok :D
lolslayer
Re: The Time APP
CPSNAP wrote:I know you guys probably already have this, which would be weird if you didn't but, here's the code.
#include
#include
using namespace std;
int main(){
int second = 0;
cout << second << endl;
Sleep(1000);
while (second >= 0){
second++;
cout << second << endl;
Sleep(1000);
}
return 0;
}
My pink bredrin has arrived
Neesy
Re: The Time APP
Neesy wrote:CPSNAP wrote:I know you guys probably already have this, which would be weird if you didn't but, here's the code.
#include
#include
using namespace std;
int main(){
int second = 0;
cout << second << endl;
Sleep(1000);
while (second >= 0){
second++;
cout << second << endl;
Sleep(1000);
}
return 0;
}
My pink bredrin has arrived
lol :P
indeed, another one using colours, even with less reason -.-
neesy deserves it even more :/ (well, even isn't the right word)
lolslayer
Re: The Time APP
Neesy wrote:CPSNAP wrote:I know you guys probably already have this, which would be weird if you didn't but, here's the code.
#include
#include
using namespace std;
int main(){
int second = 0;
cout << second << endl;
Sleep(1000);
while (second >= 0){
second++;
cout << second << endl;
Sleep(1000);
}
return 0;
}
My pink bredrin has arrived
Yeah I meant to do that :).
CPSNAP
Re: The Time APP
This is version 1.6
#include
#include
using namespace std;
int main(){
int secondsA = 0;
int second = 0;
bool Minpass = false;
int manyMin = 1;
cout << second << endl;
Sleep(1000);
//-------------------------------------------------------------------
while (second >= 0){
while (second != 59){
second++;
cout << second << endl;
Sleep(1000);
if (second == 59)
Minpass = true;
}
while (second == 59 && Minpass == true){
secondsA;
cout << manyMin << ":" << secondsA << endl;
secondsA++;
Sleep(1000);
if (secondsA == 60){
secondsA = 0;
manyMin++;
}
}
}
return 0;
}
#include
#include
using namespace std;
int main(){
int secondsA = 0;
int second = 0;
bool Minpass = false;
int manyMin = 1;
cout << second << endl;
Sleep(1000);
//-------------------------------------------------------------------
while (second >= 0){
while (second != 59){
second++;
cout << second << endl;
Sleep(1000);
if (second == 59)
Minpass = true;
}
while (second == 59 && Minpass == true){
secondsA;
cout << manyMin << ":" << secondsA << endl;
secondsA++;
Sleep(1000);
if (secondsA == 60){
secondsA = 0;
manyMin++;
}
}
}
return 0;
}
CPSNAP
Re: The Time APP
The console. It's like print in python or basic. If you mean the command, it's cout.lolslayer wrote:ehm, where does it print all the numbers?
Heatguts
Re: The Time APP
Heatguts wrote:The console. It's like print in python or basic. If you mean the command, it's cout.lolslayer wrote:ehm, where does it print all the numbers?
Thx ;D
lolslayer
Re: The Time APP
HatchetHaro wrote:Forgive me, but...
I don't get it. How do I execute that code?
You need Visual Studio 2013 or what I use, Ultimate.
CPSNAP
Re: The Time APP
You need a C++ compiler. There's definitely more than those two. I pasted it into an online one and it didn't work. The specific error was the inclusion of the module or whatever you call it in C++ and maybe that's Visual Studio specific, or just not accessible from an online compiler.
Heatguts
Re: The Time APP
Heatguts wrote:You need a C++ compiler. There's definitely more than those two. I pasted it into an online one and it didn't work. The specific error was the inclusion of themodule or whatever you call it in C++ and maybe that's Visual Studio specific, or just not accessible from an online compiler.
No your right, and don't compile it online it might most likely give you errors.
CPSNAP
Re: The Time APP
CPSNAP wrote:Okay I'll try.lolslayer wrote:make it online compatible : 3
thx ;D
lolslayer
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|