| | |
c home work
![]() |
•
•
Join Date: Nov 2006
Posts: 2
Reputation:
Solved Threads: 0
i am new student i had a home work but i cant get this done
how can i input in the same line a char and two integers
the output should be like this :
please enter candidate family condition, defect percent,
children number, working condition: s 20 0 1
in my program i wrote it like this:
i dont get it right when i input this : s 20 0 1
i tried without space even,but the teacher told us we have to input the data in one line and spaces between them
i would be happy if anyoe could help me
thx
how can i input in the same line a char and two integers
the output should be like this :
please enter candidate family condition, defect percent,
children number, working condition: s 20 0 1
in my program i wrote it like this:
c Syntax (Toggle Plain Text)
printf("please enter candidate family condition, defect percent, children number, working condition: "); scanf("%c,%d,%d,%d",&status,&defect,&chnum,&w_cond);
i tried without space even,but the teacher told us we have to input the data in one line and spaces between them
i would be happy if anyoe could help me
thx
Last edited by ~s.o.s~; Nov 27th, 2006 at 12:20 pm. Reason: Added code tags.
•
•
Join Date: Nov 2006
Posts: 2
Reputation:
Solved Threads: 0
thank you Ancient Dragon it worked well
![]() |
Similar Threads
- Recursive Fibonacci (C)
- Internet Connection Sharing won't work! (Windows NT / 2000 / XP)
- how can I copy asp.net project from one system and work on it in a different system (ASP.NET)
- IE problems - about: blank setting self as home page (Viruses, Spyware and other Nasties)
- help me in this home work please (C++)
- Hi everyone (Geeks' Lounge)
- set me some home work plz (C++)
Other Threads in the C Forum
- Previous Thread: How to select data frm text file based on a condition
- Next Thread: How to convert an integer number to binary??
| Thread Tools | Search this Thread |
* adobe ansi api array arrays binarysearch calculate centimeter char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux hacking hardware highest homework i/o inches incrementoperators intmain() iso km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat openwebfoundation pattern pdf performance pointer posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scanf scheduling segmentationfault send shape single socketprograming socketprogramming stack standard strchr string suggestions test unix urboc user variable voidmain() whythiscodecausesegmentationfault win32api windows.h






