write with for loop c++

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question
100%
write with for loop c++
int main()
{
int a=10,toplam=0;
while(a>0)
{
if (a%3==0)
{
toplam=toplam+a;
printf("%d\n",toplam);
a=a-1;
return 0;
}
Transcribed Image Text:int main() { int a=10,toplam=0; while(a>0) { if (a%3==0) { toplam=toplam+a; printf("%d\n",toplam); a=a-1; return 0; }
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Linear Programming Concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT