Search:

Type: Posts; User: prafiate

Search: Search took 0.00 seconds.

  1. Replies
    24
    Views
    2,804

    Oh alright thanks aot. That helped me tons!

    Oh alright thanks aot. That helped me tons!
  2. Replies
    24
    Views
    2,804

    I haven't learned arrays yet, so I dont really...

    I haven't learned arrays yet, so I dont really understand the correction. I also don't quite pick up on the logic with the modulus.
  3. Replies
    1
    Views
    1,775

    scanf problem. with very simple calculator.

    The program works fine up until after the first calculation. The program prompts the user to enter Y or N to calculate again. But scanf wont take the the input.
    Also I know it would be better to...
  4. Replies
    24
    Views
    2,804

    if (day > 3 && day < 21 || day < 23 && day

    if
    (day > 3 && day < 21 || day < 23 && day < 31)
    printf("\n%dth", day);

    elseif (day == 1 || day == 21 || day == 31)
    printf("\n%dst", day);

    else
    ...
  5. Replies
    24
    Views
    2,804

    Also my book hasn't gotten to character strings...

    Also my book hasn't gotten to character strings yet. So I guess i'll have to find another way to configure the ending for the days
  6. Replies
    24
    Views
    2,804

    So I would really only declare a variable as char...

    So I would really only declare a variable as char if i wanted to store a singler character? otherwise I should use a character string?
  7. Replies
    24
    Views
    2,804

    Displaying dates bug

    The program is supposed to have the user enter a date in the format of day month year. Example 12 12 2012 then dispaly it as 12th december 2012.
    When I run the code it displays 12h december 2012 or...
  8. Replies
    6
    Views
    3,883

    Oh, alright, its strange that it compiled and the...

    Oh, alright, its strange that it compiled and the program did what I intended, but I'll change it to the correct value types. Thanks

    Actually I had changed scanf call too along with the printf. I...
  9. Replies
    6
    Views
    3,883

    Thanks! problem solved

    Thanks! problem solved
  10. Replies
    6
    Views
    3,883

    Temperature conversion program bug.

    This program is supposed to prompt the user to either convert form celsius to degree or vice versa. Then ask for a temperature to be entered and ouput the result. When I enter the temperature, the...
  11. Replies
    3
    Views
    983

    yes, thats good sloves my problem. Thanks!

    yes, thats good sloves my problem. Thanks!
  12. Replies
    3
    Views
    983

    Nested if question.

    /*program 3.3 using nested ifs to analyze numbers*/
    #include <stdio.h>
    #include <limits.h>/*for LONG_MAX*/

    int main()
    {

    long test = 0L; /*stores the integer to be checked*/
    ...
  13. Cant find the syntax error....and clarification on what my program is doing.

    gcc says: In function 'main':
    error: syntax error before "int"
    error: syntax error before "char"


    #include <stdio.h>

    int main(){
    int i;
  14. Replies
    12
    Views
    1,580

    Good to know. Thanks alot

    Good to know. Thanks alot
  15. Replies
    12
    Views
    1,580

    im puzzled because i left the size of my array as...

    im puzzled because i left the size of my array as [10] just to see what would happend and my program seems to be running fine with no problems. Source code comes right out of a book and the array in...
  16. Replies
    12
    Views
    1,580

    thanks guys! problem solved. although i am...

    thanks guys! problem solved. although i am puzzled because it seems to be running fine even though i did not change the size of my array.
  17. Replies
    12
    Views
    1,580

    ohh, the semicolon at the end of the loop is not...

    ohh, the semicolon at the end of the loop is not supposed to be there. but now when i compile and execute. the program asks for the the count and when i set it. the program ends execution
  18. Replies
    12
    Views
    1,580

    easy C question on problem with loop/output

    #include <stdio.h>
    #include <string.h>
    int main(){
    char message [10];
    int count, i;

    strcpy(message, "Hello World");

    printf("Repeat how many times?");
    ...
Results 1 to 18 of 18