Created
September 7, 2016 07:09
-
-
Save Zoha131/d119fbefb079b22be540203a5f439536 to your computer and use it in GitHub Desktop.
From the lecture video and reference.cs50.net I have learnt to use get_string(void) this method but It don't work in cs50 IDE. Instead of get_string(void), GetString() method is working in my IDE.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
int main(void){ | |
printf("type char:"); | |
printf("This is char %c\n\n", GetChar()); | |
printf("type double:"); | |
printf("This is double %f\n\n", GetDouble()); | |
printf("type float:"); | |
printf("This is float %1.5f\n\n", GetFloat()); | |
printf("type int:"); | |
printf("This is int %i\n\n", GetInt()); | |
printf("type long long:"); | |
printf("This is long long %lld\n\n", GetLongLong()); | |
printf("type string:"); | |
printf("This is string %s\n\n", GetString()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
int main(void){ | |
printf("type char:"); | |
printf("This is char %c\n\n", get_char(void)); | |
printf("type double:"); | |
printf("This is double %f\n\n", get_double(void)); | |
printf("type float:"); | |
printf("This is float %1.5f\n\n", get_float(void)); | |
printf("type int:"); | |
printf("This is int %i\n\n", get_int(void)); | |
printf("type long long:"); | |
printf("This is long long %lld\n\n", get_long_long(void)); | |
printf("type string:"); | |
printf("This is string %s\n\n", get_string(void)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment