All pastes #266789 Raw Edit

Untitled

public text v1 · immutable
·published 2006-12-04 11:14 UTC
rendered paste body
// Christian Becker - 04.12.06
// Aufgabe 5

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
#include <dos.h>
#include <stdlib.h>

main()

{
	float summe = 0, i = 1, n;
   cout << "Bitte geben sie eine Positive Zahl eingeben: ";
   cin >> n;
   while(i<=n)
   {
	summe=summe+i;
   i = i+2;
   }
	cout << summe;
	getch();
	return 0;
}