#include <conio.h>
#include <stdio.h>
#include <windows.h>
#include <string.h>
#include <stdlib.h>



void display(void);
void menu(void);
void dinfo(void);

int main()
{
    
    char username[9],username1[9];   
    char password [5],pass[5];
    int y=1;
    
    strcpy(username1,"udental");
    strcpy(password,"1987");
    
    display();
    
    
    do
    {
                 
                  
                  printf("\n\n\n\n\n\n\t\t\tPlease enter your username:");
                  scanf("%s",username);
                  //Right here i want to print out ****
                  printf("\n\n\n\n\n\t\t\tPlease enter your password:");
                  scanf("%s",pass);
                  
                                            
                           if (strcmp(username,username1)==0 &&  strcmp(password,pass) == 0)
                           
                            {
                                Sleep(1000);  
                                system("cls");
                                break;                                                                                                                 
                               
                             } 
                               
                           else 
                           
                            {
                                printf("\n\n\t\t\t YOU HAVE MADE AN INVALID INPUT");
                                printf("\n\n\t\t\t      PLEASE TRY AGAIN\n\n"); 
                                Sleep (1000);
                                system("cls");
                            }                             
                  
                  
                  y++;
                  
     }while(y<4);             
    
     menu(); 
    
    
    
    getch();
    return 0;
}

void display(void)
{
     
     
     printf("\n\n\t\t\tSMILES DENTAL CENTRE\n\n");
     printf("\n\n\t\t    WHERE YOU GET THE PERFECT SMILE\n\n");
     printf("\n\n\n\n\t\t       PRESS ENTER TO CONTINUE");
     getchar();
     system("cls");     
         
}

void menu(void)
{
     
     printf("\n\n\t\t\t   WELCOME TO THE SYSTEM MENU");
     printf("\n\n\t\t\t PLEASE SELECT YOUR OPTION BELOW");
     
     printf("\n\n\t\t\t       PATIENTS MENU");
     printf("\n\n\t\t\t       PRINT RECEIPT");
     printf("\n\n\t\t\t       DISPLAY REPORTS");
     printf("\n\n\t\t\t       PATIENTS NOTIFICATION");
     printf("\n\n\t\t\t       DOCTOR RECORDS");
     printf("\n\n\t\t\t       DOCTORS INFORMATION");
     printf("\n\n\t\t\t       EXIT");
          
}

void dinfo(void)
{
     char choice;
     
     printf("\n\n\t\t\t   THE DOCTORS INFORMATION ARE LISTED BELOW");
     printf("\n\n\t\t\t   PLEASE CHOOSE THE CORRECT CODE BELOW");
     printf("\n\n\t\t\t   O------ORTHODONTIST");
     printf("\n\n\t\t\t   S------DENTAL SURGEON");
     printf("\n\n\t\t\t   D------DENTIST");
     
     printf("\n\n\t\t\t   ENTER OPTION:");
     scanf("%c",&choice);
     
     switch (choice)
     {
            case 'o':case 'O':{
                                printf("\n\n NAME IS: DR.ROBERT WILLIAMS");
                                printf("\n\n NUMBER: 987-8976 OR 453-7869");
                                printf("\n\n SPECIALISATION IS:ORTHODONTIST");
                                printf("\n\n FEILD:BRACES");
                                break;
                               } 
                               
            case 'S':case 's':{
                                printf("\n\n NAME IS: DR.JAMES BROWN");
                                printf("\n\n NUMBER: 987-8978 OR 443-7869");
                                printf("\n\n SPECIALISATION IS:DENTAL SURGEON");
                                printf("\n\n FEILD:ROOT CANALS,DENTURES,DENTAL IMPLANTS,CROWNING");
                                break;
                              }
                              
            case 'd':case 'D':{
                                printf("\n\n NAME IS: DR.JOHN WHYTE");
                                printf("\n\n NUMBER: 987-8978 OR 467-7869");
                                printf("\n\n SPECIALISATION IS:DENTIST");
                                printf("\n\n FEILD:EXTRACTION,CLEANING,FILLINGS");
                                break;
                              }  
            
            default: printf("\n\nYOU HAVE ENTERED AN INCORRECT OPTION");
            
        }
            
            
}            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            










     
#include <conio.h>
#include <stdio.h>
#include <windows.h>
#include <string.h>
#include <stdlib.h>



void display(void);
void menu(void);
void dinfo(void);

int main()
{
    
    char username[9],username1[9];   
    char password [5],pass[5];
    int y=1;
    
    strcpy(username1,"udental");
    strcpy(password,"1987");
    
    display();
    
    
    do
    {
                 
                  
                  printf("\n\n\n\n\n\n\t\t\tPlease enter your username:");
                  scanf("%s",username);
                  //Right here i want to print out ****
                  printf("\n\n\n\n\n\t\t\tPlease enter your password:");
                  scanf("%s",pass);
                  
                                            
                           if (strcmp(username,username1)==0 &&  strcmp(password,pass) == 0)
                           
                            {
                                Sleep(1000);  
                                system("cls");
                                break;                                                                                                                 
                               
                             } 
                               
                           else 
                           
                            {
                                printf("\n\n\t\t\t YOU HAVE MADE AN INVALID INPUT");
                                printf("\n\n\t\t\t      PLEASE TRY AGAIN\n\n"); 
                                Sleep (1000);
                                system("cls");
                            }                             
                  
                  
                  y++;
                  
     }while(y<4);             
    
     menu(); 
    
    
    
    getch();
    return 0;
}

void display(void)
{
     
     
     printf("\n\n\t\t\tSMILES DENTAL CENTRE\n\n");
     printf("\n\n\t\t    WHERE YOU GET THE PERFECT SMILE\n\n");
     printf("\n\n\n\n\t\t       PRESS ENTER TO CONTINUE");
     getchar();
     system("cls");     
         
}

void menu(void)
{
     
     printf("\n\n\t\t\t   WELCOME TO THE SYSTEM MENU");
     printf("\n\n\t\t\t PLEASE SELECT YOUR OPTION BELOW");
     
     printf("\n\n\t\t\t       PATIENTS MENU");
     printf("\n\n\t\t\t       PRINT RECEIPT");
     printf("\n\n\t\t\t       DISPLAY REPORTS");
     printf("\n\n\t\t\t       PATIENTS NOTIFICATION");
     printf("\n\n\t\t\t       DOCTOR RECORDS");
     printf("\n\n\t\t\t       DOCTORS INFORMATION");
     printf("\n\n\t\t\t       EXIT");
          
}

void dinfo(void)
{
     char choice;
     
     printf("\n\n\t\t\t   THE DOCTORS INFORMATION ARE LISTED BELOW");
     printf("\n\n\t\t\t   PLEASE CHOOSE THE CORRECT CODE BELOW");
     printf("\n\n\t\t\t   O------ORTHODONTIST");
     printf("\n\n\t\t\t   S------DENTAL SURGEON");
     printf("\n\n\t\t\t   D------DENTIST");
     
     printf("\n\n\t\t\t   ENTER OPTION:");
     scanf("%c",&choice);
     
     switch (choice)
     {
            case 'o':case 'O':{
                                printf("\n\n NAME IS: DR.ROBERT WILLIAMS");
                                printf("\n\n NUMBER: 987-8976 OR 453-7869");
                                printf("\n\n SPECIALISATION IS:ORTHODONTIST");
                                printf("\n\n FEILD:BRACES");
                                break;
                               } 
                               
            case 'S':case 's':{
                                printf("\n\n NAME IS: DR.JAMES BROWN");
                                printf("\n\n NUMBER: 987-8978 OR 443-7869");
                                printf("\n\n SPECIALISATION IS:DENTAL SURGEON");
                                printf("\n\n FEILD:ROOT CANALS,DENTURES,DENTAL IMPLANTS,CROWNING");
                                break;
                              }
                              
            case 'd':case 'D':{
                                printf("\n\n NAME IS: DR.JOHN WHYTE");
                                printf("\n\n NUMBER: 987-8978 OR 467-7869");
                                printf("\n\n SPECIALISATION IS:DENTIST");
                                printf("\n\n FEILD:EXTRACTION,CLEANING,FILLINGS");
                                break;
                              }  
            
            default: printf("\n\nYOU HAVE ENTERED AN INCORRECT OPTION");
            
        }
            
            
}            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            










     
#include <conio.h>
#include <stdio.h>
#include <windows.h>
#include <string.h>
#include <stdlib.h>



void display(void);
void menu(void);
void dinfo(void);

int main()
{
    
    char username[9],username1[9];   
    char password [5],pass[5];
    int y=1;
    
    strcpy(username1,"udental");
    strcpy(password,"1987");
    
    display();
    
    
    do
    {
                 
                  
                  printf("\n\n\n\n\n\n\t\t\tPlease enter your username:");
                  scanf("%s",username);
                  //Right here i want to print out ****
                  printf("\n\n\n\n\n\t\t\tPlease enter your password:");
                  scanf("%s",pass);
                  
                                            
                           if (strcmp(username,username1)==0 &&  strcmp(password,pass) == 0)
                           
                            {
                                Sleep(1000);  
                                system("cls");
                                break;                                                                                                                 
                               
                             } 
                               
                           else 
                           
                            {
                                printf("\n\n\t\t\t YOU HAVE MADE AN INVALID INPUT");
                                printf("\n\n\t\t\t      PLEASE TRY AGAIN\n\n"); 
                                Sleep (1000);
                                system("cls");
                            }                             
                  
                  
                  y++;
                  
     }while(y<4);             
    
     menu(); 
    
    
    
    getch();
    return 0;
}

void display(void)
{
     
     
     printf("\n\n\t\t\tSMILES DENTAL CENTRE\n\n");
     printf("\n\n\t\t    WHERE YOU GET THE PERFECT SMILE\n\n");
     printf("\n\n\n\n\t\t       PRESS ENTER TO CONTINUE");
     getchar();
     system("cls");     
         
}

void menu(void)
{
     
     printf("\n\n\t\t\t   WELCOME TO THE SYSTEM MENU");
     printf("\n\n\t\t\t PLEASE SELECT YOUR OPTION BELOW");
     
     printf("\n\n\t\t\t       PATIENTS MENU");
     printf("\n\n\t\t\t       PRINT RECEIPT");
     printf("\n\n\t\t\t       DISPLAY REPORTS");
     printf("\n\n\t\t\t       PATIENTS NOTIFICATION");
     printf("\n\n\t\t\t       DOCTOR RECORDS");
     printf("\n\n\t\t\t       DOCTORS INFORMATION");
     printf("\n\n\t\t\t       EXIT");
          
}

void dinfo(void)
{
     char choice;
     
     printf("\n\n\t\t\t   THE DOCTORS INFORMATION ARE LISTED BELOW");
     printf("\n\n\t\t\t   PLEASE CHOOSE THE CORRECT CODE BELOW");
     printf("\n\n\t\t\t   O------ORTHODONTIST");
     printf("\n\n\t\t\t   S------DENTAL SURGEON");
     printf("\n\n\t\t\t   D------DENTIST");
     
     printf("\n\n\t\t\t   ENTER OPTION:");
     scanf("%c",&choice);
     
     switch (choice)
     {
            case 'o':case 'O':{
                                printf("\n\n NAME IS: DR.ROBERT WILLIAMS");
                                printf("\n\n NUMBER: 987-8976 OR 453-7869");
                                printf("\n\n SPECIALISATION IS:ORTHODONTIST");
                                printf("\n\n FEILD:BRACES");
                                break;
                               } 
                               
            case 'S':case 's':{
                                printf("\n\n NAME IS: DR.JAMES BROWN");
                                printf("\n\n NUMBER: 987-8978 OR 443-7869");
                                printf("\n\n SPECIALISATION IS:DENTAL SURGEON");
                                printf("\n\n FEILD:ROOT CANALS,DENTURES,DENTAL IMPLANTS,CROWNING");
                                break;
                              }
                              
            case 'd':case 'D':{
                                printf("\n\n NAME IS: DR.JOHN WHYTE");
                                printf("\n\n NUMBER: 987-8978 OR 467-7869");
                                printf("\n\n SPECIALISATION IS:DENTIST");
                                printf("\n\n FEILD:EXTRACTION,CLEANING,FILLINGS");
                                break;
                              }  
            
            default: printf("\n\nYOU HAVE ENTERED AN INCORRECT OPTION");
            
        }
            
            
}
Ancient Dragon commented: What is all that poorly formatted code, and with no code tags ? -5
Dave Sinkula commented: :LOL: -2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.