Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
133 views
in Computer by (55.1k points)
closed by

do-while लूप का प्रयोग करके प्रथम एक सौ विषम संख्याओं का योगफल छापने हेतु C++ भाषा में एक प्रोग्राम लिखिए। 

1 Answer

+1 vote
by (51.3k points)
selected by
 
Best answer

#include<iostream.h>
void main( )

{
int i = 1, sum = 0;
do

{

if(1%2 ! = 0)

{
Sum=sum + 1;
}
1++;

} whi1e(i < = 100);

cout<<"The sum is :"<<sum;
}

आउटपुट:

The sum is : 2500
 

Related questions

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...