Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

How to mask my password with ***?

$
0
0
#include<stdio.h>
#include<stdlib.h>


int main()
{
int Pass;

printf("Please enter the password: ");
scanf("%d", &Pass);

if(Pass==123456)
{
printf("\nHello! Eve. Welcome to Disney ATM\n\n");              
}
else if(Pass==654321)
{
printf("\nHello! Adam. Welcome to Disney ATM\n\n");
}
else
{
printf("\nAccess denied!!! :)/>\n\n");
}
system("pause");
return 0;

} 



how can i mask out the password. example if i type out my password, it will show as ******
And i would like to print out this --> printf("Processing - - - - - - -") in a loop. every 300 msec print one dot ("-").

thanks.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>