<?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: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-2607419547580427220</id><updated>2011-11-27T16:37:51.041-08:00</updated><title type='text'>Crank That LAZY Programmer!!</title><subtitle type='html'>My love belongs to you. My codes belongs to me...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://darcoder.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2607419547580427220/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://darcoder.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Darkun</name><uri>http://www.blogger.com/profile/15450349043211994262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2607419547580427220.post-5023456367335552991</id><published>2008-11-12T03:28:00.001-08:00</published><updated>2008-11-12T06:38:24.109-08:00</updated><title type='text'>C++ Date() Class</title><content type='html'>&lt;div style="text-align: justify;"&gt;Our teacher gave us a quiz today which is to improve our previous program, the &lt;span style="font-weight: bold;"&gt;date&lt;/span&gt; class. The concept of this program is to input the number of day, the month, and the year. For example, your input for days = 30, month = 1, and year = 2008. The output will be 1/30/2008. So we need to improve our previous code into a much better program. We need to add functions that can check if the input of number of days  are acceptable in the month. For example, the month of April has a maximum of 30 days, if I the input is 31, the function will able to know that input in number of days is wrong. We also add a function that can able to know if the input year is a leap year or not.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here are some of my codes:&lt;br /&gt;//this funtion will help you to know if the number of days and the month are acceptable&lt;br /&gt;int checkDate()&lt;br /&gt;{&lt;br /&gt;     int n;&lt;br /&gt;    //this code is for all the months w/ 31 days&lt;br /&gt;     if(month==1||month==3||month==4.........................................)&lt;br /&gt;     {  if(days&lt;=31){ n=1;} else n=0; }&lt;br /&gt;    ................................&lt;br /&gt;    ...............................&lt;br /&gt;    ...............................&lt;br /&gt;    ................................&lt;br /&gt;    //you will get an idea for all the months w/ 30 days above&lt;br /&gt;   if(month==2)//for february&lt;br /&gt;   {&lt;br /&gt;          if(leapyear()==1)&lt;br /&gt;          {&lt;br /&gt;             if(days&lt;=29)&lt;br /&gt;             n=1;&lt;br /&gt;             else n=0;&lt;br /&gt;           ............................&lt;br /&gt;           ............................&lt;br /&gt;   }&lt;br /&gt;    return n;&lt;br /&gt;}&lt;br /&gt;//this function will help you know if the input year is a leapyear&lt;br /&gt;int leapyear()&lt;br /&gt;{&lt;br /&gt;       int n;&lt;br /&gt;       if(year%4==0)&lt;br /&gt;       n=1;&lt;br /&gt;       else&lt;br /&gt;       n=0;&lt;br /&gt;   &lt;br /&gt;      return n;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;string getDate()&lt;br /&gt;{&lt;br /&gt;     ........................&lt;br /&gt;     .......................&lt;br /&gt;     .......................&lt;br /&gt;     char ambot[20]="1\1\1990";&lt;br /&gt;if(checkDate()==1)//if the input days and month are acceptable, statements below will execute&lt;br /&gt;     {&lt;br /&gt;         ...................................&lt;br /&gt;         .....................................&lt;br /&gt;         ....................................&lt;br /&gt;         .....................................&lt;br /&gt;         so on..................&lt;br /&gt;     &lt;br /&gt;        return "variable";&lt;br /&gt;        }&lt;br /&gt;       else //if the inputs are not acceptable, the 1\1\1990 will be the value for setDate()&lt;br /&gt;       return ambot;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Hope you get an idea from that. If you have a better idea than this, you can do what you want. It is a matter of style. ^^ If there are any question about the code or if I'm wrong, feel free to post comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2607419547580427220-5023456367335552991?l=darcoder.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://darcoder.blogspot.com/feeds/5023456367335552991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2607419547580427220&amp;postID=5023456367335552991' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2607419547580427220/posts/default/5023456367335552991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2607419547580427220/posts/default/5023456367335552991'/><link rel='alternate' type='text/html' href='http://darcoder.blogspot.com/2008/11/c-date-class.html' title='C++ Date() Class'/><author><name>Darkun</name><uri>http://www.blogger.com/profile/15450349043211994262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2607419547580427220.post-1089313187544702352</id><published>2008-11-10T03:31:00.000-08:00</published><updated>2008-11-10T03:45:32.421-08:00</updated><title type='text'>12345 into 1 2 3 4 5 output</title><content type='html'>Create a program which will ask the user to input 5 digit number and display the numbers between spaces.&lt;br /&gt;&lt;br /&gt;input:&lt;br /&gt;12345&lt;br /&gt;&lt;br /&gt;output:&lt;br /&gt;1 2 3 4 5&lt;br /&gt;&lt;br /&gt;Here's the tip:&lt;br /&gt;&lt;br /&gt;12345 - 2345 = 10000/10000 = 1&lt;br /&gt;2345 - 345 = 2000/1000 = 2&lt;br /&gt;345 - 45 = 300/100 = 3&lt;br /&gt;45 - 5 = 40/10 = 4&lt;br /&gt;45 - 40 = 5&lt;br /&gt;&lt;br /&gt;You will notice that you need to subtract the 12345 to 2345. 2345 is the digit except for the 1st digit number. How to get it?&lt;br /&gt;&lt;br /&gt;12345%10000 = 2345&lt;br /&gt;&lt;br /&gt;its like 12345/10000 = 1.2345&lt;br /&gt;&lt;br /&gt;This % will get the remainder.&lt;br /&gt;&lt;br /&gt;Hope you get an idea from that.&lt;br /&gt;&lt;br /&gt;If you have any comment, feel free to post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2607419547580427220-1089313187544702352?l=darcoder.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://darcoder.blogspot.com/feeds/1089313187544702352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2607419547580427220&amp;postID=1089313187544702352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2607419547580427220/posts/default/1089313187544702352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2607419547580427220/posts/default/1089313187544702352'/><link rel='alternate' type='text/html' href='http://darcoder.blogspot.com/2008/11/12345-into-1-2-3-4-5-output.html' title='12345 into 1 2 3 4 5 output'/><author><name>Darkun</name><uri>http://www.blogger.com/profile/15450349043211994262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2607419547580427220.post-5654960959842089087</id><published>2008-11-10T03:11:00.000-08:00</published><updated>2008-11-10T03:13:12.636-08:00</updated><title type='text'>SUP!</title><content type='html'>Let me tell you that everyone can create a program!! THATS ALL :D!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2607419547580427220-5654960959842089087?l=darcoder.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://darcoder.blogspot.com/feeds/5654960959842089087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2607419547580427220&amp;postID=5654960959842089087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2607419547580427220/posts/default/5654960959842089087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2607419547580427220/posts/default/5654960959842089087'/><link rel='alternate' type='text/html' href='http://darcoder.blogspot.com/2008/11/sup.html' title='SUP!'/><author><name>Darkun</name><uri>http://www.blogger.com/profile/15450349043211994262</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
