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
def play_game(start_range, end_range) | |
computer_guess = rand(start_range..end_range) | |
user_guesses = [] | |
puts "Guess a number" | |
user_guess = gets.chomp.to_i | |
while user_guess != computer_guess | |
if user_guesses.include?(user_guess) |
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 <stdlib.h> | |
#include <stdio.h> | |
#define DEFAULT_SIZE 16 | |
int no_of_words = 0; //Number of elements in array | |
int array_size = DEFAULT_SIZE; | |
int *stack; //Stack pointer | |
void init_stack() { | |
stack = malloc(sizeof(uint32_t) * DEFAULT_SIZE); |
NewerOlder