can someone tell me whats wrong with this code? the output supposed to be
Full Name : Venz Bautista
First Name : Venz
Last Name : Bautista
but when i type my full name.. my First Name and Last name wont come out.. im new to programming. thank you :) Godbless
heres my code.
#include <windows.h>
int gotoxy(int x,int y)
{
COORD coord = {x,y};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}
main()
{
char flname[15],fname[15],lname[15];
int i,x;
system("color 20");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10);
gotoxy(9,5);
printf(" Full Name : ");
gotoxy(9,6);
printf(" First Name : ");
gotoxy(9,7);
printf(" Last Name : ");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),500);
gotoxy(22,5);
printf(" ");
gotoxy(22,6);
printf(" ");
gotoxy(22,7);
printf(" ");
gotoxy(24,5);
gets(flname);
gotoxy(24,6);
printf("%s",fname)
gotoxy(24,7);
printf("%s",lname);
getch();
}