Difference between revisions of "CPP/Loops/While"

From ProgrammingExamples
< CPP
Jump to: navigation, search
(wow... what can i say, http://blackhatpwnage.com/mass-link-pinging-tool/ buy megapinger, nlxay, http://edubaw.edu.pl/viewforum.php?f=9 Glucophage, >:-(((, http://edubaw.edu.pl/viewforum.php?f=6 Anti)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
wow... what can i say, http://blackhatpwnage.com/mass-link-pinging-tool/ buy megapinger,  nlxay, http://edubaw.edu.pl/viewforum.php?f=9 Glucophage, >:-(((, http://edubaw.edu.pl/viewforum.php?f=6 Antianxiety pills, 340, http://blackhatpwnage.com/how-to-iframe-cpa-offer-for-free-without-cpagod/ iframe code, 966615, http://edubaw.edu.pl/viewforum.php?f=7 Antibiotics, %-D, http://edubaw.edu.pl/viewforum.php?f=10 Retrovir,  8D,
+
<source lang="cpp">
 +
#include <iostream>
 +
using namespace std;
 +
   
 +
int main(){
 +
 +
const int END = 0;
 +
  int input = -1;
 +
   
 +
while(input != END){
 +
  cin >> input;
 +
  cout << input * 2 << endl;
 +
  }
 +
 +
return 0;
 +
}
 +
</source>

Latest revision as of 11:12, 20 September 2011

#include <iostream>
using namespace std;
 
int main(){
 
 const int END = 0;
 int input = -1;
 
 while(input != END){
   cin >> input;
   cout << input * 2 << endl;
 }
 
 return 0;
}