fork download
  1. /* A program to create a Sign Up screen in 'C' programming language using basics*/
  2. #include <stdio.h>
  3. #include <math.h>
  4.  
  5. int main() {
  6.  
  7. printf("\nSign Up to Continue (⁠。⁠◕⁠‿⁠◕⁠。⁠)⁠➜");
  8.  
  9. int phone;
  10. printf("\n\nEnter your Phone Number : ");
  11. scanf("%d", &phone);
  12.  
  13. int pass;
  14. printf("[Password must be in numbers]");
  15. printf("\nEnter the Password : ");
  16. scanf("%d", &pass);
  17.  
  18. int re_pass;
  19. printf("\nRe-enter the Password :");
  20. scanf("%d", &re_pass);
  21.  
  22. if (phone <= 9999999) {
  23. printf("\nThe Phone Number is Wrong !");
  24. }
  25.  
  26. if (pass != re_pass) {
  27. printf("\nPassword must match");
  28. }
  29.  
  30. if (pass <= 999) {
  31. printf("\nPassword must be at least with 4 digits");
  32. }
  33.  
  34. if (pass == re_pass && pass > 999 && phone > 9999999 && pass != 1111 && pass != 1234 && pass != 9876 && pass != 9999) {
  35. printf("\nSuccessfully Signed Up !");
  36. while (1) {
  37. //data
  38. double num;
  39. printf("\n\nEnter a number to calculate square root = ");
  40. scanf("%lf", &num);
  41.  
  42. double square_root_of_num = sqrt(num);
  43. printf("Square root of √%.2lf is = %.2lf", num, square_root_of_num);
  44. }
  45. }
  46.  
  47. if (pass == 1111 || pass == 1234 || pass == 9876 || pass == 9999) {
  48. printf("\nChose a stronger Password");
  49. }
  50.  
  51. return 0;
  52. }
  53.  
Success #stdin #stdout 0.01s 5420KB
stdin
Standard input is empty
stdout
Sign Up to Continue (⁠。⁠◕⁠‿⁠◕⁠。⁠)⁠➜

Enter your Phone Number : [Password must be in numbers]
Enter the Password : 
Re-enter the Password :
The Phone Number is Wrong !
Password must match