Skip to content

Instantly share code, notes, and snippets.

@64lines
Created December 23, 2013 05:04
Show Gist options
  • Save 64lines/8091877 to your computer and use it in GitHub Desktop.
Save 64lines/8091877 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
/**********************************
* Application: Touche *
**********************************
* Description: Application *
* that emulate a brain structure *
* to save information *
**********************************/
struct neuron { int id[10]; char name[16]; char value[16]; };
char TITLE[] = "Touche!";
void show_title(void) {
printf("\t### %s ###\n\n", TITLE);
}
/*
* Method that add a neuron to the brain
*/
void add_neuron(void) {
struct neuron st_neuron;
printf("Id: ");
scanf("%d", st_neuron.id);
printf("Name: ");
scanf("%s", st_neuron.name);
printf("Value: ");
scanf("%s", st_neuron.value);
printf("--> Id: [%d]\n", * st_neuron.id);
printf("--> Name: [%s]\n", st_neuron.name);
printf("--> Value: [%s]\n", st_neuron.value);
}
int main(int argc, char *args[]) {
show_title();
add_neuron();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment