#include%26lt;string.h%26gt;
#include%26lt;stdio.h%26gt;
#include%26lt;conio.h%26gt;
#include%26lt;ctype.h%26gt;
#define p "cool"
#define u "1IS2"
main()
{
clrscr();
char pass[30],uname[30],x;
printf("Username: ");
gets(uname);
printf("Password: ");
gets(pass);
if(strcmp(uname,u)==0%26amp;%26amp;strcmp(pass,p)=...
{
/*in here, i hav to print variable 'uname' to uppercase and variable 'pass' to lowercase, please help me out, you can edit this if you want*/
}
else
{
textcolor(12);
cprintf("Incorrect Username/Password");
puts("\nCheck capitalization/spelling");
}
getch();
return 0;
}
/*your help will be much appreciated*/
How can I convert Uppercase string to lower case and Lowercase string to upper case in Turbo C++?
include %26lt;ctype.h%26gt;
...
if(strcmp(uname,u)==0%26amp;%26amp;strcmp(...
{
printf("%s",toupper(uname));
printf("%s",tolower(pass));
}
...
I Hope it helps.
Reply:include %26lt;ctype.h%26gt;
if(strcmp(uname,u)==0%26amp;%26amp;strcmp(...
{
printf("%s",toupper(uname));
printf("%s",tolower(pass));
}
use the abv procedute to solve ur prblm
Reply:You got toupper and tolower functions to do that job...
Reply:Thats confusing
cheap flowers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment