C0r3y8
Stéphane Barale
 
 
/*
** Config PC
** main.c
** Compilation : gcc -Wall -Wextra -Werror main.c
** Execution : ./a.out
** @author C0r3y8 (Stephane Barale)
*/

#include <stdio.h>

typedef struct s_component
{
char *type;
char *name;
} t_component;

const t_component pc[] =
{
{"Operating System", "Windows 7 Ultimate Edition (X64)"},
{"Processor ", "i7 3930K 3.20 GHz"},
{"Mother Board ", "ASUS RAMPAGE IV EXTREME"},
{"RAM ", "4 x 4Go (G.Skill) 1600MHz"},
{"Graphic Card ", "NVIDIA GeForce GTX 680"},
{"Keyboard ", "Razer BlackWidow Ultimate"},
{"Mouse ", "Razer Lachesis 5600dpi"},
{"Screen ", "ASUS VG278 1920 x 1080 27\""},
{"Hard Disk ", "3 x WD VelociRaptor 1 To"},
{"SSD (Raid 0) ", "2 x SSD CorsairForceGT 120 Go"},
{NULL, NULL}
};

void ft_add_space(char *str)
{
int size;

size = -1;
while (str[++size] != '\0');
while (size++ <= 16)
printf(" ");
}

int main(void)
{
int counter;

counter = -1;
while (pc[++counter].type && pc[counter].name)
{
printf("%s", pc[counter].type);
ft_add_space(pc[counter].type);
printf("---> %s\n", pc[counter].name);
}
return (0);
}
Sin conexión
Comentarios
Mr Pika 21 SEP 2020 a las 11:29 a. m. 
blatant cheater
AimLikeKotTM 20 JUN 2018 a las 12:27 p. m. 
french rocket league unrank tryhard ♥♥♥♥ get ♥♥♥♥♥♥
inf. 10 JUN 2018 a las 8:05 a. m. 
u look like a born fetus ♥♥♥♥♥♥♥ kid
Si!ikOnO'r 10 NOV 2014 a las 10:24 a. m. 
Alors cor3y8 ce COD? ça vaut le coup ou quoi?
KL3W4R 17 DIC 2013 a las 2:57 a. m. 
Oh non, tu as acheté encore un COD !!! Tu sombre dans le côté obscur d'Activision