I meant I know how to read inputs from users such as using scanf(), fgets() etc... then assigning those values to variables. I am not really familiar with assigning integer values into int arrays by...
Type: Posts; User: 98dodgeneondohc
I meant I know how to read inputs from users such as using scanf(), fgets() etc... then assigning those values to variables. I am not really familiar with assigning integer values into int arrays by...
mark[] = {7,6,9,4,7,7,5,10,8,6,5};
How would I modify this array so that it instead takes the values from the user input?
How would I modify this array so that it instead takes the values from the user input?
srand(time());
number=rand()%<enter the number u want it to go up to here>;
make sure to #include<time.h>
Guys, what I need to know is how I will take the marks (entered by the user), and enter it in the chart.
I know how to read inputs from the user. I just don't know how to output them on the...
I don't understand what u mean. Please give me an example.
I'm making a program that would do something like this:
Enter the mark out of 10 for a set of 20 students:
7 6 9 4 7 7 5 10 8 6 5
Below is the chart of number of students vs mark out of 10
uhhhhh ok. woke up on the wrong side of the bed? if u don't feel like helping, then just simply stop posting in this thread.
why?
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
int number;
char question[200];
char answer[50];
char correct[50];
How do u assign a string to a character variable?
For example:
char question[200];
question=<this is the string>;
Another thing I don't understand well is the int main() & int main(void)... What is the purpose of (void)???
Can someone then explain why scanf() cannot be used to take an input that has a "space" while fgets() can?
Can someone give me an explanation on Input & Output functions? So far I only know how to use scanf() & printf(), but I don't know how they work exactly.. I just know the syntax :( .
The book I...
thanks brotha!!!! :D
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char get_first(void);
int main(void)
{
char line1[40];
char line2[40];
char line3[40];
how will it know where to put the *'s based on what the user enters??? .... X is number of students and Y is marks by the way
lol! sorry man.. I accidentally pressed enter half way through the post before posting the question. :p
I'm making a program that lets the user enter a bunch of info, like student grades for example... then the program will produce a chart using the entered data.
Chart should look like this:
...
what does the "i" stand for??
this is the loop that I want to use. How would I make it so that instead of each character being printed out in the screen, the computer stores it in an array?
I don't quite understand the codes you guys gave.
This is the program that I am working on:
#include<stdio.h>
#include<string.h>
int main()
Sorry about that. I was very frustrated and tired yesterday. I'm actually teaching myself c programming. I don't quite undestand the scanf() function throughly. I just know how to use it, but...
[QUOTE=98dodgeneondohc]
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
char answer;
int guess;
int tries;
so I can't use scanf, then what am I suppose to use?