This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
void triangle(int t){ | |
int i, x; | |
for (i = 0; i <= t; i++){ | |
cout << endl; | |
for (x = 0; x < i; x++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <cstdlib> | |
#include <ctime> | |
#include <cmath> | |
using namespace std; | |
// Functions from other programs | |
int sum(int a, int b){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
using std::endl; | |
using std::cout; | |
using std::cin; | |
float getTotal (float nums[], int allNums){ | |
float answer=0.0; | |
for (int i = 0; i < allNums; i++) { | |
answer=answer+nums[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
int CheckFile(string fileName){ | |
ifstream InList; | |
InList.open(fileName.c_str()); | |
if (InList.is_open()) { | |
cout << "File Open" << endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using std::cout; | |
using std::cin; | |
using std::endl; | |
int dotProduct(int num1, int num2){ | |
int ans; | |
ans = num1*num2; | |
return ans; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo myservo; | |
int pos = 0; | |
void setup() { | |
myservo.attach(9); //pin9 | |
} | |
void loop() { | |
for (pos = 0; pos <= 360; pos += 1) { | |
myservo.write(pos); | |
delay(15); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
#include <iomanip> | |
using std::cout; | |
using std::cin; | |
using std::endl; | |
using std::setprecision; | |
int numPre(long double x){ | |
int num = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using std::string; | |
using std::cin; | |
using std::cout; | |
using std::endl; | |
void checkPal(string word){ | |
int i; | |
for(i=0; i<(word.size()/2); i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using std::cout; | |
using std::cin; | |
using std::endl; | |
int checkMod3(int checkNum){ | |
int work, ans; | |
work = checkNum%3; | |
if (work == 0){ | |
ans = checkNum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using std::cout; | |
using std::cin; | |
using std::endl; | |
#include "BigIntegerLibrary.hh" | |
BigInteger checkReverse(BigInteger num) { /*Codigo sacado de internet*/ | |
BigInteger reverse = 0; | |
while(num != 0) { |
NewerOlder