Skip to main content

Popular posts from this blog

Day of Week according to Date

We have 7 days in a week. And the first Day of the Date System is Sunday . And it should be. So, 01.01.0001, i.e., First Date of Christ was Sunday. We just number the days as follows. 0 = Sunday 1 = Monday 2 = Tuesday 3 = Wednessday 4 = Thursday 5 = Friday 6 = Saturday So, we can handle every day by the reminder of 7. Cause, u just see, after every 7 days the same day is repeated. Then, lets a rough Calculation. 01/01/0001 => Sunday = 0 Now, we just try to find out the day on 1st January on next year, i.e., 01/01/0002 0001 has 365 days. So, after 365 days which day will come? To find out the answer of this question we have to perform following calculation. 7 ) 365 ( 52 35 ----- 15 14 ---- 1 The reminder is 1, i.e.,Monday. But, using this method, it is very critical to find out the day of 1st January of 1988. So, we have an another idea. Find out how many Leap years are present before current year. Suppose it is L . So, L = y/4 If Current year is...

IntArray Class Definition:: It can hold an array of Integer with Diffrent Size

A Class named ' intarray ' which can store an integer array of different size. This Class contains:: O Constructor with deafault argument value At the time of Object creation if array size is missing then An array of size 0 will be created. O Copy Constructor This Constructor is used to create a new Object from an existing Object. O Overloaded Operator = This operator is overloaded to assign an intarray object into another object, simply as two integer variables can be made. O Overloading Operator [ ] As array element can be reffered by its position declaring in Subscript operator ( [ ] ), here every element of an object array can be reffered by [ ] operator. O Overloading Operator >> This is an input operator . Here we can take input to a object simply by this line cin >> a; . Here a is an intarray object. O Overloading Operator This is an output operator . Here we can get the output of an intarray object by this line cout . Here a is an intarray ob...