0 Members and 2 Guests are viewing this topic.
#include <iostream>#include <ctime>using namespace std;int main (){ main: srand(time(NULL)); unsigned char n = rand() % 100+1; int g; cout << "Guess a number between 1 and 1oo (you get cake if you win): "; while (g != n) { cin >> g; if (g > n) cout << "\nLower: "; else if (g < n) cout << "\nHigher: "; } cout << "You win! Congradulations. Sorry, no cake, it was a lie.\n"; goto main; return 0;}
We shall defend our island, whatever the cost may be, we shall fight on the beaches, we shall fight on the landing grounds, we shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender.
Valuve Admin Steve: If not we at valve can act as a "guardian gateway".Valuve Admin Steve: I will be your daddy.
#include <iostream>using namespace std;int main(void) {cout<<"░░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄░░░░░░░"<<endl;cout<<"░░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄░░░░"<<endl;cout<<"░░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█░░░"<<endl;cout<<"░░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░░█░░"<<endl;cout<<"░▄▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░░█░"<<endl;cout<<"█░▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒░█"<<endl;cout<<"█░▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█"<<endl;cout<<"░█░▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█░"<<endl;cout<<"░░█░░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█░░"<<endl;cout<<"░░░█░░░░██░░▀█▄▄▄█▄▄█▄████░█░░░"<<endl;cout<<"░░░░█░░░░▀▀▄░█░░░█░█▀██████░█░░"<<endl;cout<<"░░░░░▀▄░░░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█░░"<<endl;cout<<"░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░▒░░░█░"<<endl;cout<<"░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░░░░█░"<<endl;cout<<"░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░░░░█░░"<<endl;return 0;}
Code: [Select]#include <iostream>using namespace std;int main(void) {cout<<"░░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄░░░░░░░"<<endl;cout<<"░░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄░░░░"<<endl;cout<<"░░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█░░░"<<endl;cout<<"░░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░░█░░"<<endl;cout<<"░▄▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░░█░"<<endl;cout<<"█░▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒░█"<<endl;cout<<"█░▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█"<<endl;cout<<"░█░▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█░"<<endl;cout<<"░░█░░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█░░"<<endl;cout<<"░░░█░░░░██░░▀█▄▄▄█▄▄█▄████░█░░░"<<endl;cout<<"░░░░█░░░░▀▀▄░█░░░█░█▀██████░█░░"<<endl;cout<<"░░░░░▀▄░░░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█░░"<<endl;cout<<"░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░▒░░░█░"<<endl;cout<<"░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░░░░█░"<<endl;cout<<"░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░░░░█░░";system("pause>nul");return 0;}
#include <iostream>using namespace std;int main(void) {cout<<"░░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄░░░░░░░"<<endl;cout<<"░░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄░░░░"<<endl;cout<<"░░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█░░░"<<endl;cout<<"░░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░░█░░"<<endl;cout<<"░▄▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░░█░"<<endl;cout<<"█░▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒░█"<<endl;cout<<"█░▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█"<<endl;cout<<"░█░▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█░"<<endl;cout<<"░░█░░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█░░"<<endl;cout<<"░░░█░░░░██░░▀█▄▄▄█▄▄█▄████░█░░░"<<endl;cout<<"░░░░█░░░░▀▀▄░█░░░█░█▀██████░█░░"<<endl;cout<<"░░░░░▀▄░░░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█░░"<<endl;cout<<"░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░▒░░░█░"<<endl;cout<<"░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░░░░█░"<<endl;cout<<"░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░░░░█░░";system("pause>nul");return 0;}
system("pause>nul");
#include <iostream>#include <math.h>using namespace std;int main (){cout << "Pythagorean theorem calculator." << endl << "~~~~~~~~~~~~~~~~~~~~~~~~~" << endl << "Enter a: ";int a, b;cin >> a;system("CLS");cout << "Enter b: ";cin >> b;system("CLS");cout << "c = " << sqrt(pow(a, 2)+pow(b, 2)) << "."system("pause>nul");return 0;}
:< I think C# is horrible already...Here's aspx. (Some dutch content)Nevermind stored it locally.Posting soon!
idk ,, but i was just posting where i thought talking about c++ might go and maybe get some pointers... ima go sit in my darkest corner now
so taking a c++ course and im not learning diddly quawt from my teacher even tho shes really nice.. i have resorted to youtube and online help which is helping but it could only go so far..im a total noob and im trying to make something as simple as a calculator for a food charge ex:should ask you for the food charge and calculate the amount of a 18% tip and 7% sales tax and the toTAL.this is what i have so far:#include <iostream>using namespace std;int main(){ cout << "Enter charge for the food \n"; const double PERCENT_TIP = 0.18; system("pause"); return 0;}i dont know what function i put or how to put in the percentages into the code. probably did that wrong helpeth