//Sum
of odd and even numbers
#include<iostream.h>
#include<conio.h>
void
main()
{
int
sumeven=0,sumodd=0,i;
clrscr();
for(i=0;i<=100;++i)
{
if(i%2==0)
sumeven=sumeven+i;
else
sumodd=sumodd+i;
}
cout<<"SUM
OF EVEN NUMBERS="<<sumeven;
cout<<"\nSUM
OF ODD NUMBERS="<<sumodd;
getch();
}
factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.
ReplyDeletefactorial-of-hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.