When I run this code, it lists the numbers, but I want to learn the total number of numbers.thanks

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

When I run this code, it lists the numbers, but I want to learn the total number of numbers.thanks

for example

1,2,5,,8,,8,5,8,5,

total number=8

#include <iostream>
#include<cmath>
using namespace std;


int suma(int n)
{
int m,sum = 0;
while (n > 0)
{
m = n % 10;
sum = sum + m;
n = n / 10;
}
return sum;
}

int main()
{
int j =0;
cout<< "\nGantep Number: ";
for(int i=1;i<100000;i++)
{
int result = suma(i);
if(result == 12)
{
cout<< i<<" ";
j++;
if(j/100==0)
{
cout<<"\n";
}
}

}
return 0;
}

#include <iostream>
using namespace std;
int suma(int n)
{
int m,sum = 0;
while (n > 0)
{
m = n % 10;
sum = sum + m;
n = n / 10;
}
return sum;
}
int main()
{
int j =0;
cout<< "\nGantep Number: ";
for(int i=1;i<100000;i++)
{
suma(i);
12)
int result
if(result
{
cout<< i<<" ";
j++;
if(j/100==0)
{
cout<<"\n";
}
}
}
return 0;
}
Transcribed Image Text:#include <iostream> using namespace std; int suma(int n) { int m,sum = 0; while (n > 0) { m = n % 10; sum = sum + m; n = n / 10; } return sum; } int main() { int j =0; cout<< "\nGantep Number: "; for(int i=1;i<100000;i++) { suma(i); 12) int result if(result { cout<< i<<" "; j++; if(j/100==0) { cout<<"\n"; } } } return 0; }
6202 26211 26220 26301 26310 26400 27003 27012 27021 27030 27102 27111 27120 27201 27210 27300 28002 28011 28020 28101 28110 28200 29001 29010 29100 30009 30018 30027 30036 30045 30054 30063 30
072 30081 30090 30108 30117 30126 30135 30144 30153 30162 30171 30180 30207 30216 30225 30234 30243 30252 30261 30270 30306 30315 30324 30333 30342 30351 30360 30405 30414 30423 30432 30441 304
50 30504 30513 30522 30531 30540 30603 30612 30621 30630 30702 30711 30720 30801 30810 30900 31008 31017 31026 31035 31044 31053 31062 31071 31080 31107 31116 31125 31134 31143 31152 31161 3117
O 31206 31215 31224 31233 31242 31251 31260 31305 31314 31323 31332 31341 31350 31404 31413 31422 31431 31440 31503 31512 31521 31530 31602 31611 31620 31701 31710 31800 32007 32016 32025 32034
32043 32052 32061 32070 32106 32115 32124 32133 32142 32151 32160 32205 32214 32223 32232 32241 32250 32304 32313 32322 32331 32340 32403 32412 32421 32430 32502 32511 32520 32601 32610 32700
33006 33015 33024 33033 33042 33051 33060 33105 33114 33123 33132 33141 33150 33204 33213 33222 33231 33240 33303 33312 33321 33330 33402 33411 33420 33501 33510 33600 34005 34014 34023 34032 3
4041 34050 34104 34113 34122 34131 34140 34203 34212 34221 34230 34302 34311 34320 34401 34410 34500 35004 35013 35022 35031 35040 35103 35112 35121 35130 35202 35211 35220 35301 35310 35400 36
003 36012 36021 36030 36102 36111 36120 36201 36210 36300 37002 37011 37020 37101 37110 37200 38001 38010 38100 39000 40008 40017 40026 40035 40044 40053 40062 40071 40080 40107 40116 40125 401
34 40143 40152 40161 40170 40206 40215 40224 40233 40242 40251 40260 40305 40314 40323 40332 40341 40350 40404 40413 40422 40431 40440 40503 40512 40521 40530 40602 40611 40620 40701 40710 4080
0 41007 41016 41025 41034 41043 41052 41061 41070 41106 41115 41124 41133 41142 41151 41160 41205 41214 41223 41232 41241 41250 41304 41313 41322 41331 41340 41403 41412 41421 41430 41502 41511
41520 41601 41610 41700 42006 42015 42024 42033 42042 42051 42060 42105 42114 42123 42132 42141 42150 42204 42213 42222 42231 42240 42303 42312 42321 42330 42402 42411 42420 42501 42510 42600
43005 43014 43023 43032 43041 43050 43104 43113 43122 43131 43140 43203 43212 43221 43230 43302 43311 43320 43401 43410 43500 44004 44013 44022 44031 44040 44103 44112 44121 44130 44202 44211 4
4220 44301 44310 44400 45003 45012 45021 45030 45102 45111 45120 45201 45210 45300 46002 46011 46020 46101 46110 46200 47001 47010 47100 48000 50007 50016 50025 50034 50043 50052 50061 50070 50
106 50115 50124 50133 50142 50151 50160 50205 50214 50223 50232 50241 50250 50304 50313 50322 50331 50340 50403 50412 50421 50430 50502 50511 50520 50601 50610 50700 51006 51015 51024 51033 510
42 51051 51060 51105 51114 51123 51132 51141 51150 51204 51213 51222 51231 51240 51303 51312 51321 51330 51402 51411 51420 51501 51510 51600 52005 52014 52023 52032 52041 52050 52104 52113 5212
2 52131 52140 52203 52212 52221 52230 52302 52311 52320 52401 52410 52500 53004 53013 53022 53031 53040 53103 53112 53121 53130 53202 53211 53220 53301 53310 53400 54003 54012 54021 54030 54102
54111 54120 54201 54210 54300 55002 55011 55020 55101 55110 55200 56001 56010 56100 57000 60006 60015 60024 60033 60042 60051 60060 60105 60114 60123 60132 60141 60150 60204 60213 60222 60231
60240 60303 60312 60321 60330 60402 60411 60420 60501 60510 60600 61005 61014 61023 61032 61041 61050 61104 61113 61122 61131 61140 61203 61212 61221 61230 61302 61311 61320 61401 61410 61500 6
2004 62013 62022 62031 62040 62103 62112 62121 62130 62202 62211 62220 62301 62310 62400 63003 63012 63021 63030 63102 63111 63120 63201 63210 63300 64002 64011 64020 64101 64110 64200 65001 65
010 65100 66000 70005 70014 70023 70032 70041 70050 70104 70113 70122 70131 70140 70203 70212 70221 70230 70302 70311 70320 70401 70410 70500 71004 71013 71022 71031 71040 71103 71112 71121 711
30 71202 71211 71220 71301 71310 71400 72003 72012 72021 72030 72102 72111 72120 72201 72210 72300 73002 73011 73020 73101 73110 73200 74001 74010 74100 75000 80004 80013 80022 80031 80040 8010
Transcribed Image Text:6202 26211 26220 26301 26310 26400 27003 27012 27021 27030 27102 27111 27120 27201 27210 27300 28002 28011 28020 28101 28110 28200 29001 29010 29100 30009 30018 30027 30036 30045 30054 30063 30 072 30081 30090 30108 30117 30126 30135 30144 30153 30162 30171 30180 30207 30216 30225 30234 30243 30252 30261 30270 30306 30315 30324 30333 30342 30351 30360 30405 30414 30423 30432 30441 304 50 30504 30513 30522 30531 30540 30603 30612 30621 30630 30702 30711 30720 30801 30810 30900 31008 31017 31026 31035 31044 31053 31062 31071 31080 31107 31116 31125 31134 31143 31152 31161 3117 O 31206 31215 31224 31233 31242 31251 31260 31305 31314 31323 31332 31341 31350 31404 31413 31422 31431 31440 31503 31512 31521 31530 31602 31611 31620 31701 31710 31800 32007 32016 32025 32034 32043 32052 32061 32070 32106 32115 32124 32133 32142 32151 32160 32205 32214 32223 32232 32241 32250 32304 32313 32322 32331 32340 32403 32412 32421 32430 32502 32511 32520 32601 32610 32700 33006 33015 33024 33033 33042 33051 33060 33105 33114 33123 33132 33141 33150 33204 33213 33222 33231 33240 33303 33312 33321 33330 33402 33411 33420 33501 33510 33600 34005 34014 34023 34032 3 4041 34050 34104 34113 34122 34131 34140 34203 34212 34221 34230 34302 34311 34320 34401 34410 34500 35004 35013 35022 35031 35040 35103 35112 35121 35130 35202 35211 35220 35301 35310 35400 36 003 36012 36021 36030 36102 36111 36120 36201 36210 36300 37002 37011 37020 37101 37110 37200 38001 38010 38100 39000 40008 40017 40026 40035 40044 40053 40062 40071 40080 40107 40116 40125 401 34 40143 40152 40161 40170 40206 40215 40224 40233 40242 40251 40260 40305 40314 40323 40332 40341 40350 40404 40413 40422 40431 40440 40503 40512 40521 40530 40602 40611 40620 40701 40710 4080 0 41007 41016 41025 41034 41043 41052 41061 41070 41106 41115 41124 41133 41142 41151 41160 41205 41214 41223 41232 41241 41250 41304 41313 41322 41331 41340 41403 41412 41421 41430 41502 41511 41520 41601 41610 41700 42006 42015 42024 42033 42042 42051 42060 42105 42114 42123 42132 42141 42150 42204 42213 42222 42231 42240 42303 42312 42321 42330 42402 42411 42420 42501 42510 42600 43005 43014 43023 43032 43041 43050 43104 43113 43122 43131 43140 43203 43212 43221 43230 43302 43311 43320 43401 43410 43500 44004 44013 44022 44031 44040 44103 44112 44121 44130 44202 44211 4 4220 44301 44310 44400 45003 45012 45021 45030 45102 45111 45120 45201 45210 45300 46002 46011 46020 46101 46110 46200 47001 47010 47100 48000 50007 50016 50025 50034 50043 50052 50061 50070 50 106 50115 50124 50133 50142 50151 50160 50205 50214 50223 50232 50241 50250 50304 50313 50322 50331 50340 50403 50412 50421 50430 50502 50511 50520 50601 50610 50700 51006 51015 51024 51033 510 42 51051 51060 51105 51114 51123 51132 51141 51150 51204 51213 51222 51231 51240 51303 51312 51321 51330 51402 51411 51420 51501 51510 51600 52005 52014 52023 52032 52041 52050 52104 52113 5212 2 52131 52140 52203 52212 52221 52230 52302 52311 52320 52401 52410 52500 53004 53013 53022 53031 53040 53103 53112 53121 53130 53202 53211 53220 53301 53310 53400 54003 54012 54021 54030 54102 54111 54120 54201 54210 54300 55002 55011 55020 55101 55110 55200 56001 56010 56100 57000 60006 60015 60024 60033 60042 60051 60060 60105 60114 60123 60132 60141 60150 60204 60213 60222 60231 60240 60303 60312 60321 60330 60402 60411 60420 60501 60510 60600 61005 61014 61023 61032 61041 61050 61104 61113 61122 61131 61140 61203 61212 61221 61230 61302 61311 61320 61401 61410 61500 6 2004 62013 62022 62031 62040 62103 62112 62121 62130 62202 62211 62220 62301 62310 62400 63003 63012 63021 63030 63102 63111 63120 63201 63210 63300 64002 64011 64020 64101 64110 64200 65001 65 010 65100 66000 70005 70014 70023 70032 70041 70050 70104 70113 70122 70131 70140 70203 70212 70221 70230 70302 70311 70320 70401 70410 70500 71004 71013 71022 71031 71040 71103 71112 71121 711 30 71202 71211 71220 71301 71310 71400 72003 72012 72021 72030 72102 72111 72120 72201 72210 72300 73002 73011 73020 73101 73110 73200 74001 74010 74100 75000 80004 80013 80022 80031 80040 8010
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY