Thread: C programming Need help Schoolwork Important !!!!!! HELP HELP .......

  1. #1
    Registered User
    Join Date
    Jul 2018
    Posts
    1

    Post C programming Need help Schoolwork Important !!!!!! HELP HELP .......

    Can someone help me to solve question 3 , I need to write a program to display Name Age Gender and Income . My output come out with the fix statement i need to put the input and still get the output according to my input

    Write a program that prompts the user to enter name (single-word string), age(integer), gender(character, M or F ) and income(2 decimal place float) Read all input values by using only one scanf() function. The program will then display the values, with appropriate labels on separate lines

    Question 3:Enter <name> <age> <gender> <income> : (place that I put my name age gender and income)

    Name : (name according the name above)
    Age : (age according the age above)
    Gender : (gender according the gender above)
    Income : (income according the income above)


    ================================================== ========

    Sorry For my poor English .....
    Last edited by waynebeh; 07-01-2018 at 11:49 PM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    So what are you actually stuck on?

    - How to use printf?
    - How to use scanf?
    - How to use scanf to read several things at once?

    Seriously, this is basically the second exercise in any introductory text - exercise 1 being printf("hello world").

    Post some kind of attempt so we can see what is actually holding you up.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Oct 2017
    Posts
    36
    From your explanation it seems clear you know the task at hand. What is holding you back? Need to see a sample or you need someone to code it outright for you?

  4. #4
    Registered User
    Join Date
    Jul 2018
    Posts
    16
    1. prompt user to input desired content
    2. create the necessary variables
    3. scan the user input and place in designated variables.
    4. Using printf display the content in their own lines. (\n will create a new line for you)

    Its a simple assignment. Its hard to help more than that unless you can tell us exactly where your issue resides

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How important is C really?
    By new2C- in forum General Discussions
    Replies: 35
    Last Post: 11-18-2013, 10:50 PM
  2. Replies: 6
    Last Post: 01-21-2013, 05:08 PM
  3. For me is very important Please...
    By pitkini in forum C++ Programming
    Replies: 3
    Last Post: 07-26-2005, 02:49 AM
  4. &...how important?
    By CAP in forum C Programming
    Replies: 1
    Last Post: 07-16-2002, 02:02 AM
  5. it is important
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 04-01-2002, 06:03 PM

Tags for this Thread