1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

C language

  1. Oct 3, 2009 #1
    could some1 help me in these 3 questions of C language

    Write a program to count the number to count the number of zero’s, one's, blank spaces and other characters using switch statement.

    Write a program to evaluate the series
    x-(x^3)/3!+)(x^5)/5!-(x^7)/7! ......... up to (x^n)/n!

    Write a program to print the entered number in reverse order
  2. jcsd
  3. Oct 3, 2009 #2


    User Avatar
    Science Advisor
    Homework Helper

    Sure, we're here to help, but we're not going to do the work for you. First, you have to show us some work, or at least ask a more specific question. Don't be ashamed if you think or know it is wrong: a failed attempt is better than no attempt at all.

    Otherwise we have no idea at all about your level of programming. Like: do you know how to write and compile a C program? Do you know about variables, loops, arrays, ...? Are you having problems converting the question to an algorithm or just implementing the algorithm in C?
  4. Oct 3, 2009 #3
    bro i am a newbie to c
    actually i have no idea for 1st and 2nd
    i know a bit but not in full detail
  5. Oct 3, 2009 #4


    User Avatar
    Science Advisor
    Homework Helper

    Surely you must have some idea... if this is homework/coursework, I can't imagine that your teacher would have you write such programs without any knowledge of C at all.
    For Q1, for example, you should at least know how to read a string from keyboard, how to loop through its characters and how a switch statement works. Do you know about cin/getline, for, and switch?
  6. Oct 3, 2009 #5
    for,switch i know
  7. Oct 3, 2009 #6


    User Avatar
    Science Advisor
    Homework Helper

    So you can start by writing out as specifically and step-by-step as possible what your program should do. For example:

    >Start of program
    - Ask the user for input string
    - Make four counters for zero, one, space and other
    - Initialize the counters to zero
    - ...
    - ...
  8. Oct 3, 2009 #7


    User Avatar

    Staff: Mentor

    We do not do your work for you. If you have a specific question, post it. If you want us to do your schoolwork for you, you are at the wrong website.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: C language
  1. C language problem ? (Replies: 13)

  2. C++ . (Replies: 19)

  3. C language (Replies: 5)