| | |
factorization of integers
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 3
Reputation:
Solved Threads: 0
In this assignment you to implement a short C program that works with factorization of integers.
You will write a C program that computes and prints out the sum of all natural numbers below
100,000 that are multiples of 3,5 or 7.
In Detail
If you are asked to sum all the natural numbers below 20 which are multiples of 3,5 or 7, it’s easy:
The answer is 99 (that is, 3+5+7+9+10+12+14+15+18). To compute this of course, we
enumerated all the natural numbers up to 20 and added to the sum (which starts out at zero),
only those which are multiples of one of the numbers requested.
In this assignment, you will do the above, but for all such numbers less than 100,000.
You will write a C program that computes and prints out the sum of all natural numbers below
100,000 that are multiples of 3,5 or 7.
In Detail
If you are asked to sum all the natural numbers below 20 which are multiples of 3,5 or 7, it’s easy:
The answer is 99 (that is, 3+5+7+9+10+12+14+15+18). To compute this of course, we
enumerated all the natural numbers up to 20 and added to the sum (which starts out at zero),
only those which are multiples of one of the numbers requested.
In this assignment, you will do the above, but for all such numbers less than 100,000.
![]() |
Similar Threads
- Factorization Script Gives False Positives (Python)
- Class that represents sets of integers (C++)
- Trouble parsing floats and integers (C++)
- integers (C)
- twenty integers in an array (Java)
- Converting Hexadecimal characters to integers. (C++)
- help with program to convert integers to roman numerals (Java)
Other Threads in the C Forum
- Previous Thread: help requested
- Next Thread: C program to test case of character
| Thread Tools | Search this Thread |
#include * ansi array arrays asterisks binarysearch calculate centimeter changingto char character convert copyanyfile copyimagefile copypdffile creafecopyofanytypeoffileinc createprocess() database dynamic execv fflush fgets file floatingpointvalidation fork forloop function getlogicaldrivestrin givemetehcodez grade gtkwinlinux histogram homework i/o ide inches include infiniteloop input interest intmain() iso keyboard km license linked linkedlist linux list looping lowest matrix meter microsoft mysql number oddnumber open opendocumentformat openwebfoundation pdf pointer posix power probleminc process program programming pyramidusingturboccodes radix read recursion recv recvblocked research reversing scheduling segmentationfault send sequential single socket socketprogramming stack standard strchr string suggestions systemcall test threads turboc unix urboc user variable whythiscodecausesegmentationfault win32api windowsapi






