+ 1
Why we write sum1=sum2=0 in the calculation program of odd qnd even numbers
Q:-write a program that will calculate the sum of odd numbers and sum of even numbers for numbers 1to 10 ans:- #include<iostream.h> void main( ) { int sum1,sum2; sum1=sum2=0;
3 odpowiedzi
+ 2
I don't know. It's the same as
int sum1 = 0, sum2 = 0;
but harder to read.
And main can't be a void function.
And <iostream> should be included without the h ending.
I don't feel like you should copy this answer.
+ 2
Which statement do you mean with "but why?"?
+ 1
but why?