
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This task was assigned by Prof. Chandrashekar Baag at Amrita Vishwa Vidyapeetham. This assignment is related to Data Structures and Representation course. It includes: Sum, While, Loop, Series, Data, Coding, Language, Insert, Input, Output, Display
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

#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(); }