Basit Scanf ve Printf Uygulaması

mustaphos

MB Üyesi
Kayıt
14 Eylül 2015
Mesajlar
34
Tepkiler
7
Yaş
23
Meslek
Öğrenci
Üniv
Anadolu University
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>

void main ()
{
char name[20];/* The name variable was defined as a char with 20 charecters */
char surname[20];/* The surname variable was defined as a char with 20 charecters */
char address[200];/* The address variable was defined as a char with 200 charecters*/

printf("**************************************************\n");
printf("******************ID DOCUMENTATION****************\n");
printf("**************************************************\n");
printf("1) What is your name ?\n");
printf("**************************************************\n");
printf("**************************************************\n");
scanf("%s",&name);/* User wrote name input and the program got the input */
printf("**************************************************\n");
printf("**************************************************\n");
printf("2) What is your surname ?\n");
printf("**************************************************\n");
printf("**************************************************\n");
scanf("%s",&surname);/* User wrote surname input and the program got the input */
printf("**************************************************\n");
printf("**************************************************\n");
printf("3) What is your address ?\n");
printf("**************************************************\n");
printf("**************************************************\n");
scanf("%s",&address);/* User wrote address input and the program got the input */
printf("**************************************************\n");
printf("**************************************************\n");
printf("**************************************************\n");
printf("Your name is : %s \n",name);/* The program wrote the name user wrote on screen */
printf("**************************************************\n");
printf("**************************************************\n");
printf("Your surname is : %s \n",surname);/* The program wrote the surname user wrote on screen */
printf("**************************************************\n");
printf("**************************************************\n");
printf("Your address is : %s \n",address);/* The program wrote the address user wrote on screen */
printf("**************************************************\n");
printf("**************************************************\n");

getch();
}
 
Yukarı Alt