Docsity

Series-Data Structures and Representation-Assigment, Exercises of Data Structures and Algorithms

Partial preview of the text

Download Series-Data Structures and Representation-Assigment and more Exercises Data Structures and Algorithms in PDF only on Docsity!

#include<iostream.h> #include<conio.h> void main (void) { int x=1,s=0; clrscr(); while (x>=0) { cin>>x; if (x>=0) s=s+x; } cout<<"\nThe sum is: "<<s; getch(); }

docsity.com