Guest User

Untitled

a guest
Mar 10th, 2021
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.66 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. int main(int argc, char *argv[]) {
  7.     char Userinput[25];
  8.     char Username[25];
  9.     char Password;
  10.     printf("DO YOU ALREADY HAVE AN USERNAME? ENTER Y/N OR ENTER 0 TO EXIT THE PROGRAM\n");
  11.     fgets(Userinput, 25, stdin);
  12.     if(Userinput[1]=='N')
  13.       {
  14.         printf("PLEASE CREATE NEW USERNAME\n");
  15.         fgets(Username, 25, stdin);
  16.         printf("YOUR NEW USERNAME IS %s\n", & Username);
  17.         printf ("PLEASE CREATE NEW PASSWORD\n");
  18.       }
  19.     else if(Userinput[0]=='Y', 'y')
  20.        {
  21.         printf("PLEASE ENTER USERNAME");
  22.        }
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment