Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Mastervorlage Gueltig ab: 2011-07-30*/
- /* Folgende Angaben sind hier im Kommentar verpflichtend zu erfassen */
- /* Adnan Kamal MAHMUD */
- /* Matrikelnummer: 1210258087
- */
- /* Exercise 04_2 */
- /* unsafe warning wird ausgeblendet */
- #define _CRT_SECURE_NO_WARNINGS
- /* Programmcode hier einf¸gen */
- #include <stdio.h>
- int main (int argc, const char * argv[]) {
- int i=0;
- int sum=0;
- int nothing=0;
- for (i = 0; i<1000; i++)
- {
- if( (i%3 == 0) || (i%5 == 0) )
- {
- sum += i;
- }
- }
- printf("Ergebnis:%d",sum);
- return 0;
- }
- /* Sample output : Ergebnis:233168*/
Add Comment
Please, Sign In to add comment