| | |
Idea
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
You are breaking down your number into its component parts then re-assembling the ASCII into a string.
There are many ways to write the same program.
All the $printf() functions return the length of bytes built.
i = printf()
i = sprintf()
i = fprintf()
i = vprintf()
etc.
That's why I use the return addition onto the base pointer to advance it for the next parse.
You can build your strings in one line but I merely concatenate the new strings onto the end.
Also you don't want "thirty zero"
But you do want "thirty-one"
Also note that written 10's requires a hyphen between it and the one's.
There are many ways to write the same program.
All the $printf() functions return the length of bytes built.
i = printf()
i = sprintf()
i = fprintf()
i = vprintf()
etc.
That's why I use the return addition onto the base pointer to advance it for the next parse.
You can build your strings in one line but I merely concatenate the new strings onto the end.
Also you don't want "thirty zero"
But you do want "thirty-one"
Also note that written 10's requires a hyphen between it and the one's.
•
•
Join Date: Sep 2009
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
shoudlnt it be like this "%s %s %s\n",string[i],string[28],string[num]); ?
about Zodiac sign ?here is the the output :
sample output
Enter Name:Anjoe
Enter Birthyear:02/08/92
name:Anjoe
age:17
Zodiac sign:tiger
using array,modulo,&looping statement instructor said
![]() |
Similar Threads
- What is the best project idea! (Computer Science)
- Good Idea - Bad Brain! (Software Development Job Offers)
- I need an idea about my FYP (IT Professionals' Lounge)
- IDEA :: Make Notes in Internet Explorer (Web Browsers)
Other Threads in the C Forum
- Previous Thread: socket programming error
- Next Thread: help with output file from screen to csv file
Views: 1339 | Replies: 36
| Thread Tools | Search this Thread |
Tag cloud for C
* adobe api append array arrays bash binarysearch char character cm copyanyfile copypdffile createcopyoffile createprocess() csyntax directory drawing dynamic executable execv feet fgets file floatingpointvalidation fork frequency function getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux highest homework i/o ide infiniteloop initialization interest intmain() iso keyboard kilometer lazy license linked linkedlist linux list lowest matrix meter microsoft mqqueue multi mysql oddnumber odf open openwebfoundation overwrite pause pdf pointer pointers posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scheduling segmentationfault send single socketprogramming spoonfeeding stack standard strchr string student suggestions system test testautomation unix urboc user whythiscodecausesegmentationfault win32 win32api windows.h





