Skip to content

Instantly share code, notes, and snippets.

@Carmenchu83
Carmenchu83 / Palindrome Numbers.cpp
Created February 7, 2021 00:26
A palindromic number is a number (such as 626) that remains the same when its digits are reversed.
/*
A palindromic number is a number (such as 626) that remains the same when its digits are reversed.
The function returns true if a given number is a palindrome, and false, if it is not.
The code in main works and results in the expected output.
*/
#include <iostream>
using namespace std;
bool isPalindrome(int x, int n) {
//complete the function
@Carmenchu83
Carmenchu83 / Countdown.cpp
Last active February 7, 2021 00:23
Given a number N as input, output numbers from N to 1 on separate lines. Also, when the current countdown number is a multiple of 5, the app should output "Beep"
/* You need to make a countdown app.
Given a number N as input, output numbers from N to 1 on separate lines.
Also, when the current countdown number is a multiple of 5, the app should output "Beep". */
#include <iostream>
using namespace std;
int main() {
//Variable
int number;
@Carmenchu83
Carmenchu83 / BMI-BMR-AMR Calculator.cpp
Created September 5, 2020 21:51
This program is a Body Mass Index (BMI), Basal Metabolic Rate (BMR) and Active Metabolic Rate (AMR) calculator.
/*
This program is a Body Mass Index (BMI), Basal Metabolic Rate (BMR) and Active Metabolic Rate (AMR) calculator.
---------------------------------------------------------------------------
BMI
---------------------------------------------------------------------------
The formula used to calculate the BMI is BMI = weigh * (703 / (height^2)).
BMI Categories:
- Underweight = <18.5.
@Carmenchu83
Carmenchu83 / Temperature Change (ENG).cpp
Last active September 4, 2020 23:12
This program converts temperature from Fahrenheit (F) to Celcius (C) and viceversa
/* This program converts temperature from Fahrenheit (F) to Celcius (C) and viceversa.
The formulas used are the following:
- Celcius to Fahrenheit: C = (F - 32)/1.8.
- Fahrenheit to Celcius: F = (C * 1.8) - 32.
*/
#include <iostream>
#include <algorithm> //Tolower and Toupper
#include <cctype> //Tolower and Toupper
@Carmenchu83
Carmenchu83 / Password Generator (ENG).cpp
Last active November 7, 2020 10:52
This programs generates passwords
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <ctime>
#include <string>
using namespace std;
int main() {
@Carmenchu83
Carmenchu83 / Currency Exchange with if (ENG).cpp
Last active September 5, 2020 21:04
Changes your money currency
/******************************************************************************
The program asks you the currency of your money, the currency to which you would like to change and your money amount.
The currency exchange used is: 1€ / 1,17$ - 1€ / 0.91 £ - 1,28 $ / 1 €.
*******************************************************************************/
#include <iostream>
#include <string>
using namespace std;
@Carmenchu83
Carmenchu83 / Currency Exchange with switch (ENG).cpp
Created September 4, 2020 10:02
Changes your money currency
/******************************************************************************
The program asks you the currency of your money, the currency to which you would like to change and your money amount.
The currency exchange used is: 1€ / 1,17$ - 1€ / 0.91 £ - 1,28 $ / 1 €.
*******************************************************************************/
#include <iostream>
using namespace std;
int main () {
@Carmenchu83
Carmenchu83 / Hello World.cpp
Last active September 4, 2020 10:02
This are different examples in which you may write a "Hello World" program
// Normal Version
#include <iostream>
using namespace std;
int main()
{
cout <<"Hello World";
return 0;
}