Skip to content

Instantly share code, notes, and snippets.

View miquilenadiego's full-sized avatar

miquilenadiego

View GitHub Profile
@miquilenadiego
miquilenadiego / load.c
Created November 10, 2017 10:18
load function of PSET5 SPELLER
#include <stdbool.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include "dictionary.h"
int main (int argc, char *argv[])
{
FILE *open = fopen(argv[1],"r");
@miquilenadiego
miquilenadiego / crack.c
Created February 14, 2017 01:41
crack.c
#define _XOPEN_SOURCE
#include <unistd.h>
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int toasci(int c);
int main(int argc, string argv[])
{
@miquilenadiego
miquilenadiego / toasci
Created February 14, 2017 01:37
Receive a position from 0 to 52 and returns the ascii value
int toasci(int c)
{
int ascii;
if (c >= 0 && c <= 25)
{
ascii = 65;
int upper = 0;
while (upper < c)
{
ascii++;
@miquilenadiego
miquilenadiego / initials.c
Created January 26, 2017 15:30
initials more comfortable
#include <stdio.h>
#include <cs50.h>
#include <ctype.h>
#include <string.h>
int main (void)
{
string s = get_string();
char f;
int len = strlen(s);