create a flowchart for this program: Enhanced security and anti-fraud protection Use of string functions System is encrypted with username and password Password characters will change into asterisk per input If the username and password are correct, display “VALID” otherwise “INVALID” program code: #include #include #include int main() { char username[15], password[15], i = 0; puts("\nusername: "); gets(username); puts("\npassword: "); for (i = 0; i < 20; i++) { password[i] = getch(); putchar('*'); if (password[i] =='\r') { password[i] = 0; break; } } if((strcmp(username,"hi") == 0) && (strcmp(password,"hello") == 0)) { printf("\n--------------------------------"); printf("\nVALID!"); } else { printf("\n--------------------------------"); printf("\nINVALID!"); } return 0; }
create a flowchart for this
Enhanced security and anti-fraud protection
Use of string functions
System is encrypted with username and password
Password characters will change into asterisk per input
If the username and password are correct, display “VALID” otherwise “INVALID”
program code:
#include <stdio.h>
#include <string.h>
#include <conio.h>
int main()
{
char username[15], password[15], i = 0;
puts("\nusername: ");
gets(username);
puts("\npassword: ");
for (i = 0; i < 20; i++)
{
password[i] = getch();
putchar('*');
if (password[i] =='\r')
{
password[i] = 0;
break;
}
}
if((strcmp(username,"hi") == 0) && (strcmp(password,"hello") == 0))
{
printf("\n--------------------------------");
printf("\nVALID!");
}
else
{
printf("\n--------------------------------");
printf("\nINVALID!");
}
return 0;
}

Step by step
Solved in 2 steps with 1 images









