| | |
summation
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Why not post the code of how you'd do it with a while loop? Then maybe your best attempt at converting it to a for loop?
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
All of the parts of a for loop are optional. For example, to write an infinite loop you might do this:
Converting a while loop to a for loop is trivial with that little tidbit. Of course, there are other ways, but they require restructuring the loop a bit.
C Syntax (Toggle Plain Text)
for ( ; ; ) { /* Stuff */ }
I'm here to prove you wrong.
![]() |
Similar Threads
- Calculate the summation and subtraction of 100 digit integers. (C)
- exponential summation help PLEASE! (C++)
- Loops (C++)
- summation program (C++)
- a non-destructive repartitioning tool? (*nix Software)
- Does random data compress? (Computer Science)
- pow: DOMAIN error (C++)
Other Threads in the C Forum
- Previous Thread: Multiple output Handles
- Next Thread: segmentation fault
| Thread Tools | Search this Thread |
#include adobe api array arrays asterisks binarysearch calculate char cm copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory dynamic feet fflush fgets file fork forloop framework frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o include incrementoperators input interest kernel kilometer linked linkedlist linux linuxsegmentationfault list lists locate logical_drives loopinsideloop. match matrix meter microsoft motherboard mqqueue multi mysql number odf opensource owf pattern pdf performance pointer posix probleminc process program programming pyramidusingturboccodes radix read recursion recv repetition research scanf scheduling scripting segmentationfault sequential shape socket socketprograming stack standard string strings systemcall testing turboc unix user voidmain() wab windows.h






