Searching...
Thursday, October 31, 2013

Basic idea on printf function

1:16 PM

This program is depentd  on printf function. in  most of c programs we use Printf function  .  Now I want to give you a basic idea on printf function. 

#include <stdio.h>
main()
{
      printf("\t\n\aCreat a new gmail account\n");
     
      char firstName[12];
      puts("Enter your first name > ");
      gets(firstName);
     
      char lastName[12];
      puts("Enter your last name > ");
      gets(lastName);
     
      char userName[12];
      puts("Choose your user name > ");
      gets(userName);
     
      int password[10];
      puts("Creat a password > ");
      gets(password);
     
      int confirmPassword[10];
      puts("Confirm your password > ");
      gets(confirmPassword);
     
      char birthDay[12];
      puts("Enter your birth day > ");
      gets(birthDay);
     
      char gender[12];
      puts("Gender > ");
      gets(gender);
     
      int mobileNumber[12];
      puts("Enter your mobile number > ");
      gets(mobileNumber);
     
      char country[12];
      puts("Country > ");
      gets(country);
     
      printf("\n\t\aWelcome to Gmail, Your Gmail account has been successful\n\nFirst Name:\n\t%s\n",firstName);
      printf("\nenter your Last Name: %s\n",lastName);
      printf("\nYour Gmail adress:%s@gmail.com\n",userName);
      printf("\nYour Password:%s\n",password);
      printf("\nYou have right password:%s\n",confirmPassword);
      printf("\nYour greatfull Birthday:%s\n",birthDay);
      printf("\nI am a %s\n",gender);
      printf("\nYour mobile number:\t%s\n",mobileNumber);
      printf("\nYour Country is %s\n",country);
      system("pause");
      return(0);
    }    
 

0 comments:

Post a Comment

Followers