-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am unable to code for the Challenge 1 in C language #137
Comments
Hello bucky:
I want to be full stack web developer. I am suppose to be on my first work term but since I don’t have the necessary php, JavaScript and WordPress knowledge, it is difficult for me to get job. I am studying computing system engineering technology at the college ,it is a 3yrs program. I am in my second of the program. Is there anyway you can help me?. I know you will be surprise how I get to know. It is through your tutorial. This is my school email [email protected]
Thank you
Paul Osuji
Sent from Mail for Windows 10
From: ShashankAdur
Sent: April 24, 2019 8:59 AM
To: buckyroberts/Source-Code-from-Tutorials
Cc: Subscribed
Subject: [buckyroberts/Source-Code-from-Tutorials] I am unable to code for theChallenge 1 in C language (#137)
First of all I would like to thank you for providing a great tutorial for C language. U helped me get a confidence that even I can code.
The issue is that I tried the code for the challenge 1 in C language.
The question was : To create a code to check whether the password has a alphabet, a number and a $ sign.
The code I entered is :
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
int main()
{
char password[50];
printf("please set a password with '$' sign: \n");
scanf(" %s", password);
( password == (isalpha(password)) && (isdigit(password)) && ('$') ) ? printf("Ur password is OK and u r good to go\n") : printf("Try a new password as per the terms and condition\n");
return 0;
}
I even tried with a normal If and Else loop but I am unable to get the answer. The above code runs without any error but directly jumps into the Else part.
I tried to refer ur website but the website isn't opening. Kindly help me to know the mistake done in this code.
Output obtained for the above mentioned code:
Using If and Else method :
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Have you got the answer?? |
No
…On Wed, 22 May, 2019, 08:07 RubySayyedPanwaar, ***@***.***> wrote:
Have you got the answer??
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#137?email_source=notifications&email_token=ALJRARPDSOMLLUFCNNSYORTPWSWYPA5CNFSM4HIC6L42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV5XF4A#issuecomment-494629616>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALJRARLRK7WAD3DUJ5VWBR3PWSWYPANCNFSM4HIC6L4Q>
.
|
Look at that the '&' operator is missing before variable 'password' inside scanf |
string doesn't need "&"
…On Wed, Jun 26, 2019 at 2:26 PM coder-nechi ***@***.***> wrote:
Look at that the '&' operator is missing before variable 'password' inside
scanf
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#137?email_source=notifications&email_token=ALJRARNFVKTCOHO5WZSNNBLP4MVNBA5CNFSM4HIC6L42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYS22HY#issuecomment-505785631>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALJRAROJHNNCJ4ZWCKIF7U3P4MVNBANCNFSM4HIC6L4Q>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all I would like to thank you for providing a great tutorial for C language. U helped me get a confidence that even I can code.
The issue is that I tried the code for the challenge 1 in C language.
The question was : To create a code to check whether the password has a alphabet, a number and a $ sign.
The code I entered is :
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
int main()
{
char password[50];
printf("please set a password with '$' sign: \n");
scanf(" %s", password);
( password == (isalpha(password)) && (isdigit(password)) && ('$') ) ? printf("Ur password is OK and u r good to go\n") : printf("Try a new password as per the terms and condition\n");
}
I even tried with a normal If and Else loop but I am unable to get the answer. The above code runs without any error but directly jumps into the Else part.
I tried to refer ur website but the website isn't opening. Kindly help me to know the mistake done in this code.
Output obtained for the above mentioned code:
Using If and Else method :
The text was updated successfully, but these errors were encountered: