Questions tagged [input]
The input tag has no usage guidance.
13 questions
0
votes
1
answer
9
views
Test code with sample input file
I'm working on some Python dictionary practice, and I have a bunch of info to toe in as user input to populate my dictionaries so that I can use debug50 and test the code. It's time consuming. How do ...
0
votes
1
answer
19
views
Trying to do pset 2, but it doesn't even accept my input. What am I doing wrong?
#include <stdio.h>
#include <cs50.h>
#include <ctype.h>
#include <string.h>
#include <math.h>
int check(int c, string key);
int main(int argc, string argv[])
{
int ...
0
votes
1
answer
23
views
Prints " Invalid vote " for " code 1 " as vote function But works fine for " code 2 " as vote function. Whats wrong with " code 1 "?
// CODE 1 :-
bool vote(string name)
{
// TODO
for (int i = 0; i < candidate_count; i++)
{
if ( candidates[i].name == name )
{
candidates[i].votes = candidates[i].votes + 1 ;
return true ;
}
}
...
0
votes
1
answer
22
views
Taking scale factor input in Resize--pset3
I'm trying to take an input integer between 1 and 100 and store its value as n, which I will then refer to as the scale factor, and use it later on in the redefinition of bi.biWidth *= n; and in ...
0
votes
1
answer
38
views
check50 is being silly
The attached image is self-explanatory.
Why does check50 not find any input request, yet the program clearly works as intended in the IDE? The code clearly shows that the program requests input.
...
0
votes
1
answer
58
views
I have 2 questions. 1 - offline programming 2 - getting user input
One:
I have very poor internet connection and I want to know if there's a way to use cs50 IDE offline.
Two:
I fooled around some with the get_(user input) functions and found that you can do this ...
0
votes
1
answer
4k
views
Can't pass input value from HTML to python (Final project)
I can't pass inputted in HTML form value to python via request.form.get('name'). I watсhed youtube and found original function request.form['name'] that doesn't work as well. Even tried to pass values ...
0
votes
1
answer
235
views
Drop down list using database values in PHP - Doesn't work - Final project
I am trying to provide drop down list in input field using values from MySQL. I tried a lots of examples from web but no one works.
Here is my code.
<div class="form-group">
<...
1
vote
1
answer
3k
views
Help with fseek and fgets
I am trying to fully grasp how these functions work.
From the Reference50 website:
fseek
FILE* out = fopen("out.txt", "w+");
fputs("Team Bowden Fever!", out);
char buffer[50];
fseek(out, 0, ...
0
votes
1
answer
129
views
Taking an array as input from User and Displaying the same back
I'm trying to take a list of numbers from user as input and store it in an array. Later I'll be displaying this array using a printf function.
I'm trying to take this input in 2 ways: as user prompt ...
0
votes
1
answer
761
views
inputing multiple value(variable)
So I was thinking that instead of inputting
1
2
3
with enter at the end of each input.
which use{ scanf("%i",&a) in a loop}
I wish to to input somthing like
1 2 3
which uses { scanf("%i %i %i",&...
0
votes
1
answer
680
views
Can't get past user input in Mario
Can't understand why this doesn't print nothing when I give the integer within the parameters...just keeps asking for an integer no matter what the user input is
0
votes
1
answer
1k
views
How to check if input is invalid with C
I am doing greedy, and I want to write a code which says that if the input is not a number, I say something other than it is a number. I know that it is not required, but I just want to know if there ...