What is the sum of 0 + 6
int i, sum = 0; for (i=0; i<20; i+=2) sum+=i;
1+0+3 is the digit sum of 103
-6
75100 is an integer, not a fraction.
What is the sum of 0 + 6
0
int i, sum = 0; for (i=0; i<20; i+=2) sum+=i;
1+0+3 is the digit sum of 103
-6
75100 is an integer, not a fraction.
It is 75100.
It is: 0+14 = 14
0
yes
main() { int i, n, sum=0; cout<<"Enter the limit"; cin>>n; for(i=0;i<=n;i++) sum=sum+i; cout<<"sum of "<<n<<" natural numbers ="<<sum; getch(); }
It is: 9+0 = 9