Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //compilacion g++ -std=c++11 -o Ejecutable Programa.cpp
- #include <iostream>
- using namespace std;
- int main (){
- int Suma(0),N(0);
- do{
- N=N+1;
- Suma=Suma+N;
- cout <<"N= "<<N<<",Suma= "<<Suma<<endl; //Control visual Proceso
- }while (N!=50);
- cout <<endl<<"Muestra="<<Suma<<endl;//Resultado
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement