<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4911150609347119767</id><updated>2024-10-08T23:48:19.729-07:00</updated><title type='text'>BlueJ Programs for ICSE and ISC</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bluejprogs1.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4911150609347119767/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://bluejprogs1.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00756740826189420104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4911150609347119767.post-3448139515216484885</id><published>2011-09-24T13:36:00.000-07:00</published><updated>2011-09-24T13:36:39.501-07:00</updated><title type='text'>To Print The Sum Of All Even And Odd Numbers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;class SumEvenOdd&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;public static void main(int a)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;int AddEven=0,AddOdd=0;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;for (int i=1;i&amp;lt;=a;i++)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;if(i%2==0)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;AddEven+=i;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;else&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;AddOdd+=i;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;System.out.println(&quot;The Sum Of All Even Numbers Till &quot;+a+&quot;= &quot;+AddEven);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;System.out.println(&quot;The Sum Of All Odd Numbers Till &quot;+a+&quot;= &quot;+AddOdd);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://bluejprogs1.blogspot.com/feeds/3448139515216484885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bluejprogs1.blogspot.com/2011/09/to-print-sum-of-all-even-and-odd.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4911150609347119767/posts/default/3448139515216484885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4911150609347119767/posts/default/3448139515216484885'/><link rel='alternate' type='text/html' href='http://bluejprogs1.blogspot.com/2011/09/to-print-sum-of-all-even-and-odd.html' title='To Print The Sum Of All Even And Odd Numbers'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00756740826189420104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>