<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="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" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5783606277521267783</atom:id><lastBuildDate>Sat, 05 Oct 2024 02:05:37 +0000</lastBuildDate><category>numbers</category><category>Char Sorting</category><category>Fibonacci</category><category>Multiplication Table</category><category>bill computation</category><category>calculator</category><category>do while</category><category>how to</category><category>operation</category><category>sorting</category><category>xy axis</category><title>BufferedReader</title><description>Java Program samples</description><link>http://bufferedreader.blogspot.com/</link><managingEditor>noreply@blogger.com (BufferedReader)</managingEditor><generator>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-3982555477205997045</guid><pubDate>Tue, 23 Aug 2011 11:51:00 +0000</pubDate><atom:updated>2011-08-23T05:20:50.651-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Fibonacci</category><title>Fibonacci Java Program</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT2y7x16f3swc4pif4qir02LLJf06aQ8OpGPzidO57vY2N-xa5S1KlTeTvI1ZeZHRAlAwt6oGVau3w3QZGjIoRTvjWUEJ5gLne4vzKTKySE8P7tHsu7G8v9eVyxmk0JBwYDszd8UdhV9tJ/s320/fibonacci.JPG&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 306px; height: 174px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5644019974179995170&quot; /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Source Code:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import java.io.*;&lt;/div&gt;&lt;div&gt;public class &lt;b&gt;Fibonacci&lt;/b&gt; {&lt;/div&gt;&lt;div&gt;    private static PrintStream p=System.out;&lt;/div&gt;&lt;div&gt;            public static BufferedReader q=new BufferedReader (new InputStreamReader (System.in));&lt;/div&gt;&lt;div&gt;    public static void main(String []args)throws IOException{&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        String ans;&lt;/div&gt;&lt;div&gt;        do{&lt;/div&gt;&lt;div&gt;        p.print(&quot;Enter Limit: &quot;);&lt;/div&gt;&lt;div&gt;        int n=Integer.parseInt(q.readLine());&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;       int x=1, y=1, z;&lt;/div&gt;&lt;div&gt;       p.print(x +&quot; &quot;+y +&quot; &quot;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;       for (int i=0; i&lt;n; div=&quot;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;           z=y+x;&lt;/div&gt;&lt;div&gt;           if (z&amp;lt;=n){&lt;/div&gt;&lt;div&gt;           p.print(z +&quot; &quot;);&lt;/div&gt;&lt;div&gt;           x=y;&lt;/div&gt;&lt;div&gt;           y=z;&lt;/div&gt;&lt;div&gt;           }&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        p.println();&lt;/div&gt;&lt;div&gt;        p.println(&quot;Try again?[y/n]: &quot;);&lt;/div&gt;&lt;div&gt;        ans=q.readLine();                 &lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;        while(ans.charAt(0)==&#39;Y&#39; || ans.charAt(0)==&#39;y&#39;);&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/n;&gt;&lt;/div&gt;</description><link>http://bufferedreader.blogspot.com/2011/08/fibonacci-java-program.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT2y7x16f3swc4pif4qir02LLJf06aQ8OpGPzidO57vY2N-xa5S1KlTeTvI1ZeZHRAlAwt6oGVau3w3QZGjIoRTvjWUEJ5gLne4vzKTKySE8P7tHsu7G8v9eVyxmk0JBwYDszd8UdhV9tJ/s72-c/fibonacci.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-7770527927058049241</guid><pubDate>Tue, 23 Aug 2011 11:46:00 +0000</pubDate><atom:updated>2011-08-23T04:51:33.092-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Multiplication Table</category><title>Java Program: Simple Multiplication Table</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Machine Problem:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Create a Multiplication Table that ranges from 2 to 12 only. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7ASp-OcvgLmGEV22n_vyFCm4dO00ewoE0t1wGNm7EM0_1mJ-xVM0r_g76awzfTE4Tj6H8_O2xF2jUbe7R-W496n1ZQZWlLvhvs2hWxNSmz9uHk0M1jRrXoFWejlMjvJ56I9oVqVwUKcpC/s320/multiplicationtable.JPG&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 186px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5644017733162622610&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Source Code:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;import java.io.*;&lt;/div&gt;&lt;div&gt;public class MultiplicationTable {&lt;/div&gt;&lt;div&gt;    private static PrintStream p=System.out;&lt;/div&gt;&lt;div&gt;    public static BufferedReader q= new BufferedReader (new InputStreamReader (System.in));&lt;/div&gt;&lt;div&gt;    public static void main(String []args)throws IOException{&lt;/div&gt;&lt;div&gt;     int n,x,y,z;&lt;/div&gt;&lt;div&gt;        p.println(&quot;MULTIPLICATION TABLE&quot;);&lt;/div&gt;&lt;div&gt;        do{&lt;/div&gt;&lt;div&gt;        p.print(&quot;Enter a number (2-12): &quot;);&lt;/div&gt;&lt;div&gt;        String num=q.readLine();&lt;/div&gt;&lt;div&gt;        n=Integer.parseInt(num);&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;           while(n&amp;lt;=1||n&amp;gt;=13);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;            for (x=1; x&amp;lt;=n; x++){&lt;/div&gt;&lt;div&gt;                for (y=1; y&amp;lt;=n; y++){&lt;/div&gt;&lt;div&gt;                z=x*y;&lt;/div&gt;&lt;div&gt;                p.print(z +&quot; &quot;);&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;                p.println();&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;</description><link>http://bufferedreader.blogspot.com/2011/08/java-program-simple-multiplication.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7ASp-OcvgLmGEV22n_vyFCm4dO00ewoE0t1wGNm7EM0_1mJ-xVM0r_g76awzfTE4Tj6H8_O2xF2jUbe7R-W496n1ZQZWlLvhvs2hWxNSmz9uHk0M1jRrXoFWejlMjvJ56I9oVqVwUKcpC/s72-c/multiplicationtable.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-1486066858416959053</guid><pubDate>Tue, 23 Aug 2011 11:34:00 +0000</pubDate><atom:updated>2011-08-23T04:46:05.842-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">do while</category><category domain="http://www.blogger.com/atom/ns#">numbers</category><category domain="http://www.blogger.com/atom/ns#">operation</category><title>Simple Addition, Division, and Do While in Java</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Create a Program that will add or divide, then ask the user if they&#39;d want to perform the computation again using Do While&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxg4jItz4iKIB6smfLayrjjUdZLLa1qCPwyexULWE0300AySTBod4aKTN9uDQuD2X9MxtCBItCk6lZSoyZkZCwiZyA3m2R_Gy1hXZk2lJAnSXjlP9X75PBfkus6u6UZG7rVQdkNyMMPFfQ/s320/add.JPG&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 295px; height: 265px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5644016331763150226&quot; /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Source Code:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import java.io.*;&lt;/div&gt;&lt;div&gt;public class AddDivide {&lt;/div&gt;&lt;div&gt;    private static PrintStream p=System.out;&lt;/div&gt;&lt;div&gt;    public static BufferedReader q=new BufferedReader(new InputStreamReader (System.in));&lt;/div&gt;&lt;div&gt;    public static void main (String []args)throws IOException{&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        p.println(&quot;MAIN MENU&quot;);&lt;/div&gt;&lt;div&gt;        p.println();&lt;/div&gt;&lt;div&gt;        p.println(&quot;[A] Addition&quot;);&lt;/div&gt;&lt;div&gt;        p.println(&quot;[D] Division&quot;);&lt;/div&gt;&lt;div&gt;        p.println(&quot;[E] Exit&quot;);&lt;/div&gt;&lt;div&gt;        p.println();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        p.print(&quot;Input Operation: &quot;);&lt;/div&gt;&lt;div&gt;        String input=q.readLine();&lt;/div&gt;&lt;div&gt;        String o;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                    if (input.equals(&quot;A&quot;)|| input.equals(&quot;a&quot;))&lt;/div&gt;&lt;div&gt;                    {&lt;/div&gt;&lt;div&gt;                        do{&lt;/div&gt;&lt;div&gt;                        p.print(&quot;Enter First Number: &quot;);&lt;/div&gt;&lt;div&gt;                        String num1=q.readLine();&lt;/div&gt;&lt;div&gt;                        double n1=Double.parseDouble(num1);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                        p.print(&quot;Enter Second Number: &quot;);&lt;/div&gt;&lt;div&gt;                        String num2=q.readLine();&lt;/div&gt;&lt;div&gt;                        double n2=Double.parseDouble(num2);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                        double sum;&lt;/div&gt;&lt;div&gt;                        sum=n1+n2;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                        p.println(&quot;The SUM is: &quot; +sum);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                        p.println(&quot;Perform Addition again? [Y/N] &quot;);&lt;/div&gt;&lt;div&gt;                        o=q.readLine();&lt;/div&gt;&lt;div&gt;                        }&lt;/div&gt;&lt;div&gt;                        while(o.equals(&quot;Y&quot;) || o.equals(&quot;y&quot;));&lt;/div&gt;&lt;div&gt;                    }&lt;/div&gt;&lt;div&gt;                    else if (input.equals(&quot;D&quot;) || input.equals(&quot;d&quot;))&lt;/div&gt;&lt;div&gt;                    {&lt;/div&gt;&lt;div&gt;                        do{&lt;/div&gt;&lt;div&gt;                        p.print(&quot;Enter First Number: &quot;);&lt;/div&gt;&lt;div&gt;                        String num1=q.readLine();&lt;/div&gt;&lt;div&gt;                        double n1=Double.parseDouble(num1);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                        p.print(&quot;Enter Second Number: &quot;);&lt;/div&gt;&lt;div&gt;                        String num2=q.readLine();&lt;/div&gt;&lt;div&gt;                        double n2=Double.parseDouble(num2);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                        double quo;&lt;/div&gt;&lt;div&gt;                        quo=n1/n2;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                        p.println(&quot;The quotient is: &quot; +quo);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                        p.println(&quot;Perform Division again? [Y/N] &quot;);&lt;/div&gt;&lt;div&gt;                        o=q.readLine();&lt;/div&gt;&lt;div&gt;                        }&lt;/div&gt;&lt;div&gt;                        while(o.equals(&quot;Y&quot;) || o.equals(&quot;y&quot;));&lt;/div&gt;&lt;div&gt;                    }&lt;/div&gt;&lt;div&gt;                    else if (input.equals(&quot;E&quot;) || input.equals(&quot;e&quot;))&lt;/div&gt;&lt;div&gt;                    {&lt;/div&gt;&lt;div&gt;                    System.exit(0);&lt;/div&gt;&lt;div&gt;                    }&lt;/div&gt;&lt;div&gt;                    else&lt;/div&gt;&lt;div&gt;                    {&lt;/div&gt;&lt;div&gt;                    p.print(&quot;Invalid Input!&quot;);&lt;/div&gt;&lt;div&gt;                    }                                        &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;</description><link>http://bufferedreader.blogspot.com/2011/08/simple-addition-division-and-do-while.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxg4jItz4iKIB6smfLayrjjUdZLLa1qCPwyexULWE0300AySTBod4aKTN9uDQuD2X9MxtCBItCk6lZSoyZkZCwiZyA3m2R_Gy1hXZk2lJAnSXjlP9X75PBfkus6u6UZG7rVQdkNyMMPFfQ/s72-c/add.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-7667466432468312740</guid><pubDate>Fri, 29 Jul 2011 14:46:00 +0000</pubDate><atom:updated>2011-07-29T07:51:00.158-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Char Sorting</category><category domain="http://www.blogger.com/atom/ns#">sorting</category><title>Char Sorting: Ascending and Descending in Java</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800; &quot;&gt;Create a java program that will sort the characters in ascending and descending order&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800; &quot;&gt;&lt;i&gt;Output:&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA2J0GQa-0gw-vyR0NHHmWXeTEPYNKhRbZrWhUR9aT2LXlNhSXSZkUVaweuTt9tjWsWzulN6h8fDkbF861fiTN6ts2u9cHjfe1-jM9YhtM16KuQGU0KR_pRFmMMingNq5-iswj_uvPGXjw/s400/CharSorting.JPG&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 132px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5634786748674143826&quot; /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800; &quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-style: italic; font-weight: bold; &quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;b style=&quot;font-style: italic; &quot;&gt;Source Code:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;import java.util.*;&lt;br /&gt;public class charSorting&lt;br /&gt;{&lt;br /&gt;private static PrintStream pp=System.out;&lt;br /&gt;public static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));&lt;br /&gt;public static void main(String args[])throws IOException&lt;br /&gt;{&lt;br /&gt;char[] a=new char[5];&lt;br /&gt;int x,y;&lt;br /&gt;&lt;br /&gt;for (x=0;x&lt;a.length;x++) enter=&quot;&quot; a=&quot;&quot; string=&quot;&quot; b=&quot;br.readLine();&quot;&gt;1)&lt;br /&gt;{&lt;br /&gt;pp.println(&quot;You Entered a String!&quot;);&lt;br /&gt;x=x-1;continue;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;a[x]=b.charAt(0);&lt;br /&gt;}&lt;br /&gt;pp.println();&lt;br /&gt;pp.print(&quot;Given Letter:&quot;);&lt;br /&gt;for (y=0;y&lt;a.length;y++) y=&quot;0;y&amp;lt;a.length;y++)&quot;&gt;=0;y--)&lt;br /&gt;pp.print(a[y]+&quot; &quot;);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/a.length;y++)&gt;&lt;/a.length;x++)&gt;</description><link>http://bufferedreader.blogspot.com/2011/07/char-sorting-ascending-and-descending.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA2J0GQa-0gw-vyR0NHHmWXeTEPYNKhRbZrWhUR9aT2LXlNhSXSZkUVaweuTt9tjWsWzulN6h8fDkbF861fiTN6ts2u9cHjfe1-jM9YhtM16KuQGU0KR_pRFmMMingNq5-iswj_uvPGXjw/s72-c/CharSorting.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-8319867430560814694</guid><pubDate>Thu, 19 May 2011 05:01:00 +0000</pubDate><atom:updated>2011-05-20T07:20:34.283-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">numbers</category><title>Multiples of a Number</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;Problem:&lt;/b&gt;&lt;div&gt;Write a program that will output the multiples of a number. Arrange it from lowest to highest.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Sample Output:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOCOAGqdN0Z0lQjAP8ftgNDB5BrhS2gW7h6zgxurmladOPJKcvF9CkY4Rqwi3dzwL7ZWykiBtjmQys8I7EqkJvw0oe9UAkNaI2mwo4DfOqI1w9oxDFhMJW7gQO7btoX0cHU1bmjdgyAfKu/s400/multiple.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 136px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5608289210934827282&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Source Codes:&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;package javaapplication1;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import java.io.*;&lt;/div&gt;&lt;div&gt;public class Multiple {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    public static BufferedReader q= new BufferedReader(new InputStreamReader (System.in));&lt;/div&gt;&lt;div&gt;    public static void main(String []args)throws IOException{&lt;/div&gt;&lt;div&gt;        &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        System.out.print(&quot;Enter a Number: &quot;);&lt;/div&gt;&lt;div&gt;        String a=q.readLine();&lt;/div&gt;&lt;div&gt;        int b=Integer.parseInt(a);&lt;/div&gt;&lt;div&gt;        &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        for (int x=1; &lt;b; div=&quot;&quot;&gt; x&lt;b; div=&quot;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;int y;&lt;/b;&gt;&lt;/b;&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;y=b%x;&lt;/div&gt;&lt;div&gt;            &lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;if (y==0)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;System.out.println(x);&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;        &lt;/div&gt;&lt;div&gt;  }&lt;/div&gt;</description><link>http://bufferedreader.blogspot.com/2011/05/java-program-multiples-of-number.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOCOAGqdN0Z0lQjAP8ftgNDB5BrhS2gW7h6zgxurmladOPJKcvF9CkY4Rqwi3dzwL7ZWykiBtjmQys8I7EqkJvw0oe9UAkNaI2mwo4DfOqI1w9oxDFhMJW7gQO7btoX0cHU1bmjdgyAfKu/s72-c/multiple.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-9164894832552259425</guid><pubDate>Thu, 19 May 2011 04:43:00 +0000</pubDate><atom:updated>2011-05-20T07:21:18.959-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">numbers</category><title>Reversed Numbers in Java</title><description>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; &quot;&gt;&lt;b&gt;Sample Output:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj70Pz97XyXnJJNIaZ8ZQfp-x8QrvCh4yp3HypuZx-phgD2Eyt6NvCQ7DdAmhgADU5NBktfFzri6lj66P0HYUTHPESo7aKhTv8PzF19a2ab_Nd3rjyH2F6GBFvjmkkH00X1G_One8pYTeJI/s400/reversednumbers.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 102px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5608285674282414434&quot; /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;package javaapplication1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot; style=&quot;text-indent:.5in&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;public class ReservedNumbers {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;mso-tab-count:1&quot;&gt; &lt;/span&gt;public static void main(String[] args) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;mso-tab-count:1&quot;&gt; &lt;/span&gt;int n = 12345;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;mso-tab-count:1&quot;&gt; &lt;/span&gt;int t,r = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;mso-tab-count:1&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot; style=&quot;text-indent:.5in&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;System.out.println(&quot;The original numbers : &quot; + n);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot; style=&quot;margin-left:.5in;text-indent:.5in&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;do&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot; style=&quot;margin-left:.5in;text-indent:.5in&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;mso-tab-count:1&quot;&gt;     &lt;/span&gt;t = n % 10;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;mso-tab-count:1&quot;&gt;     &lt;/span&gt;r = r * 10 + t;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;mso-tab-count:1&quot;&gt;     &lt;/span&gt;n = n / 10;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;mso-tab-count:2&quot;&gt;       &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;mso-tab-count:2&quot;&gt;       &lt;/span&gt;while (n &amp;gt; 0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;mso-tab-count:3&quot;&gt;            &lt;/span&gt;System.out.println(&quot;The reversed numbers : &quot; + r);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span style=&quot;font-family:&amp;quot;Courier New&amp;quot;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;</description><link>http://bufferedreader.blogspot.com/2011/05/java-program-reversed-numbers.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj70Pz97XyXnJJNIaZ8ZQfp-x8QrvCh4yp3HypuZx-phgD2Eyt6NvCQ7DdAmhgADU5NBktfFzri6lj66P0HYUTHPESo7aKhTv8PzF19a2ab_Nd3rjyH2F6GBFvjmkkH00X1G_One8pYTeJI/s72-c/reversednumbers.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-2084176379667769098</guid><pubDate>Thu, 19 May 2011 04:21:00 +0000</pubDate><atom:updated>2011-05-20T07:22:00.586-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">how to</category><title>How to Open Edit Window for Programming</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;How to open an edit Window:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Note:&lt;/b&gt; &lt;i&gt;Make sure you have a Java bin&lt;/i&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Go to command prompt and encode the following:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. cd\&lt;press enter=&quot;&quot;&gt;&lt;/press&gt;&lt;/div&gt;&lt;div&gt;2. cd Program Files &lt;enter&gt;&lt;/enter&gt;&lt;/div&gt;&lt;div&gt;3. cd java &lt;enter&gt;&lt;/enter&gt;&lt;/div&gt;&lt;div&gt;4. dir&lt;enter&gt;&lt;/enter&gt;&lt;/div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDfza74Ivsp05etKBjQLa_GYKHh10x7R3AuJIKjz5nU1qvLkbHut_dyYJKK3OISUVGasOV_DcKI88sSRBb4Z34AHFt_OSTySMB-GDBnHf4R9TwGLwhp885Mget5gOy3xwprvzyllX8hLIX/s400/jdk.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 202px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5608279502850685154&quot; /&gt;&lt;div&gt;Look for the jdk as shown above then follow the next step&lt;/div&gt;&lt;div&gt;5. cd jdk1.6.0_22&lt;/div&gt;&lt;div&gt;6. cd bin&lt;/div&gt;&lt;div&gt;7. edit filename.java&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You&#39;d be directed to edit window.&lt;/div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ2iGgjCEAC-s3__mazuBEw2xK5oD7Y1SgbQEakzf_qNfz1i6g62LAQUfa4Pck0bKL_voAH0PQ7bGdne1E2LJar25skOaIvgjgYqWiEQr3UsNntp7DAd8gxSL01t8pMzF6pBYIbXOjHBmt/s400/edit_window.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 205px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5608280777032578770&quot; /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;How to run&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1. Alt F-S&lt;/div&gt;&lt;div&gt;2. Alt F-X&lt;/div&gt;&lt;div&gt;3. javac filename.java&lt;/div&gt;&lt;div&gt;4. java filename&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;How to edit&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1. edit filename.java&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;as discussed in AMA East Rizal Campus, Philippines&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://bufferedreader.blogspot.com/2011/05/how-to-open-edit-run-edit-window.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDfza74Ivsp05etKBjQLa_GYKHh10x7R3AuJIKjz5nU1qvLkbHut_dyYJKK3OISUVGasOV_DcKI88sSRBb4Z34AHFt_OSTySMB-GDBnHf4R9TwGLwhp885Mget5gOy3xwprvzyllX8hLIX/s72-c/jdk.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-3222409314476680599</guid><pubDate>Wed, 18 May 2011 07:56:00 +0000</pubDate><atom:updated>2011-05-20T07:22:18.996-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">xy axis</category><title>Java Program: X and Y axis</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;font-size: 11pt; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-size: 11pt; &quot;&gt;&lt;b&gt;Problem:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;Write a program that prompts the user to input the x-y coordinate of a point in a Cartesian plane. The program should then output a message indicating whether the point is the origin point, is located on the x or y axis or appears on a particular quadrant.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: 11pt; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;Sample Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjdn10clIZ5IM1ApUi9NDnojQGIPuAT1xiNDiiGtGLgP1_LJyLubkkM6FahHnNOyahyphenhyphenRjsXJn7hd3iLKGKHCDetI2p8Ugawom5V4Vvrx2dZKb99b0WiRjjrvp8Cl7xs7zo2IuTdddafnlw/s400/num8.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 112px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5607962905802261794&quot; /&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1YgdigAN1VFGhy5HhPSUZtwNQtIVxvWnM7FzIqF6lOGxTNd2i3yWF9TjAcATl2DKFbrbRfqSEJd8BrUZmW5Kcvx_HPRCHHhBMtg-q_y3w1T13Xm94Fj2U4dxBD2GNpJVqGgedpW_fOfBx/s400/num8_1.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 117px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5607962985932632306&quot; /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 11pt; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 11pt; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;overflow:auto; height:300px; width:600px&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width:450px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;package javaapplication1;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class N8 {&lt;br /&gt;   public static BufferedReader q=new BufferedReader (new InputStreamReader (System.in));&lt;br /&gt;   public static void main (String []args)throws IOException{&lt;br /&gt;&lt;br /&gt;System.out.print(&quot;Input x: &quot;);&lt;br /&gt;String X=q.readLine();&lt;br /&gt;int x=Integer.parseInt(X);&lt;br /&gt;&lt;br /&gt;System.out.print(&quot;Input y: &quot;);&lt;br /&gt;String Y=q.readLine();&lt;br /&gt;int y=Integer.parseInt(Y);&lt;br /&gt;&lt;br /&gt; if (x&amp;gt;0 &amp;amp;&amp;amp; y&amp;gt;0)&lt;br /&gt; {&lt;br /&gt; System.out.print(&quot;Quadrant 1&quot;);&lt;br /&gt; }&lt;br /&gt; else if (x&amp;lt;0 &amp;amp;&amp;amp; y&amp;gt;0)&lt;br /&gt; {&lt;br /&gt;  System.out.print(&quot;Quadrant 2&quot;);  &lt;br /&gt; }&lt;br /&gt; else if (x&amp;lt;0 &amp;amp;&amp;amp; y&amp;lt;0)     {      System.out.print(&quot;Quadrant 3&quot;);          }     else if (x&amp;gt;0 &amp;amp;&amp;amp; y&amp;lt;0)     {      System.out.print(&quot;Quadrant 4&quot;);          }     else if (x==0 &amp;amp;&amp;amp; y&amp;lt;0)     {      System.out.print(&quot;Y axis&quot;);     }     else if (x==0 &amp;amp;&amp;amp; y&amp;lt;0 &amp;amp;&amp;amp; y&amp;gt;0)&lt;br /&gt; {&lt;br /&gt;  System.out.print(&quot;Y axis&quot;);&lt;br /&gt; }&lt;br /&gt; else if (x&amp;lt;0 &amp;amp;&amp;amp; y==0)     {      System.out.print(&quot;X axis&quot;);          }      else if (x&amp;gt;0 &amp;amp;&amp;amp; y==0)&lt;br /&gt; {&lt;br /&gt;  System.out.print(&quot;X axis&quot;);  &lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt; System.out.print(&quot;Origin&quot;);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://bufferedreader.blogspot.com/2011/05/java-program-x-and-y-axis.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjdn10clIZ5IM1ApUi9NDnojQGIPuAT1xiNDiiGtGLgP1_LJyLubkkM6FahHnNOyahyphenhyphenRjsXJn7hd3iLKGKHCDetI2p8Ugawom5V4Vvrx2dZKb99b0WiRjjrvp8Cl7xs7zo2IuTdddafnlw/s72-c/num8.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-8713884837263057512</guid><pubDate>Wed, 18 May 2011 07:00:00 +0000</pubDate><atom:updated>2011-05-20T07:22:36.580-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">calculator</category><title>Simple Calculator using Buffered Reader</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;font-size: 11pt; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-size: 11pt; &quot;&gt;&lt;b&gt;Problem:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;Write a program that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the number, the operator and the result. (For division, if the denominator is 0, output an appropriate message.)&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: 11pt; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 11pt; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;Sample Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB0mIkxLLKi6r8SOADi1Dx72nxQhZtGd1CBRJlB1ktF2cor9BIcd9mrFgX9HscDP5Kmc4CBkgemxBwN6ESu1mJL6iS2yM2zoBDK3MMcOAdVUVdeW78BpreF0PgJ1LJmCks7-4ouKGygPNI/s400/num6_1.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 113px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5607960534069253842&quot; /&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQxzEjOZ7EyzYUwPuDy5Dd_dsCdt5XojA8h1JzQ3WCgOlObMB8LPyAPgg-qZf8LpK0E9JizOjn86fmqlV2BwEOSK9GeqLIDIvxN7sHrKkzpCBZhPLmXxrpXRiuhlUP6j_6mkWRAo5Vp8tP/s400/num6.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 133px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5607960630975247362&quot; /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;overflow:auto; height:300px; width:600px&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width:450px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;public class n6 {&lt;br /&gt;   public static BufferedReader q=new BufferedReader (new InputStreamReader (System.in));&lt;br /&gt;   public static void main (String []args)throws IOException{&lt;br /&gt;&lt;br /&gt;       System.out.print(&quot;Enter 1st number: &quot;);&lt;br /&gt;       String num1=q.readLine();&lt;br /&gt;       int n1=Integer.parseInt(num1);&lt;br /&gt;&lt;br /&gt;       System.out.print(&quot;Enter operation: &quot;);&lt;br /&gt;       String op=q.readLine();&lt;br /&gt;       char o=op.charAt(0);&lt;br /&gt;&lt;br /&gt;       System.out.print(&quot;Enter 2nd number: &quot;);&lt;br /&gt;       String num2=q.readLine();&lt;br /&gt;       int n2=Integer.parseInt(num2);&lt;br /&gt;&lt;br /&gt;       if (n2==0 &amp;amp;&amp;amp; o==&#39;/&#39;)&lt;br /&gt;       {&lt;br /&gt;           System.out.println(&quot;Error&quot;);&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       else if(o == &#39;+&#39;)&lt;br /&gt;       {&lt;br /&gt;           int sum=0;&lt;br /&gt;       sum=n1+n2;&lt;br /&gt;&lt;br /&gt;       System.out.println(&quot;The sum is &quot; +sum);&lt;br /&gt;       }&lt;br /&gt;       else if(o == &#39;-&#39;)&lt;br /&gt;       {&lt;br /&gt;           int diff=0;&lt;br /&gt;       diff=n1-n2;&lt;br /&gt;&lt;br /&gt;       System.out.println(&quot;The difference is &quot; +diff);&lt;br /&gt;       }&lt;br /&gt;       else if(o == &#39;*&#39;)&lt;br /&gt;       {&lt;br /&gt;           int prod=0;&lt;br /&gt;       prod=n1*n2;&lt;br /&gt;&lt;br /&gt;       System.out.println(&quot;The product is &quot; +prod);&lt;br /&gt;       }&lt;br /&gt;       else if(o == &#39;/&#39;)&lt;br /&gt;       {&lt;br /&gt;           double quo=0;&lt;br /&gt;       quo=n1/n2;&lt;br /&gt;&lt;br /&gt;       System.out.println(&quot;The quotient is &quot; +quo);&lt;br /&gt;       }&lt;br /&gt;else&lt;br /&gt;       {&lt;br /&gt;&lt;br /&gt;       System.out.println(&quot;Invalid&quot;);&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://bufferedreader.blogspot.com/2011/05/java-program-simple-calculator-using.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB0mIkxLLKi6r8SOADi1Dx72nxQhZtGd1CBRJlB1ktF2cor9BIcd9mrFgX9HscDP5Kmc4CBkgemxBwN6ESu1mJL6iS2yM2zoBDK3MMcOAdVUVdeW78BpreF0PgJ1LJmCks7-4ouKGygPNI/s72-c/num6_1.jpg" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-8674466359728349695</guid><pubDate>Wed, 18 May 2011 06:50:00 +0000</pubDate><atom:updated>2011-05-20T07:23:01.717-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">numbers</category><title>Numbers to words in Java</title><description>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Buffered Reader&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Problem:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Write a program that accepts a number and output its equivalent in words.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;Sample input/output:&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;b&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBXpwycNTN-bf9CK7QtyYjoyYSO4e4PnK7JteDfSaKwu15FmyWawDfQOJdnJIS5PLTub9H8gAqBoCreahpsDyqpeUEQ8E6ArHU5uWRklkN9_sazw_-FfMkLq1WnpGytpwu3W0KRlxsXzt4/s400/num1.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 117px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5607953575011666210&quot; /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;b&gt;Codes:&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;overflow-x: auto; overflow-y: auto; height: 300px; width: 600px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;package javaapplication1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;import java.io.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;public class num1 {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;public static int charAt(int num, int index) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;return String.valueOf(num).charAt(index); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;private static PrintStream sys = System.out;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;public static BufferedReader q = new BufferedReader (new InputStreamReader(System.in));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;public static void main(String[] args) throws IOException {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;String[] units = {null, &quot;one&quot;, &quot;two&quot;, &quot;three&quot;, &quot;four&quot;, &quot;five&quot;, &quot;six&quot;, &quot;seven&quot;, &quot;eight&quot;, &quot;nine&quot;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;String[] tenths = {&quot;ten&quot;, &quot;eleven&quot;, &quot;twelve&quot;, &quot;thirteen&quot;, &quot;fourteen&quot;, &quot;fifteen&quot;, &quot;sixteen&quot;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                     &lt;/span&gt;&quot;seventeen&quot;, &quot;eighteen&quot;, &quot;nineteen&quot;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;String[] special = {null, null, &quot;twenty&quot;, &quot;thirty&quot;, &quot;fourty&quot;, &quot;fifty&quot;, &quot;sixty&quot;, &quot;seventy&quot;, &quot;eighty&quot;, &quot;ninety&quot;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;String[] hundreds = {null, &quot;one hundred&quot;, &quot;two hundred&quot;, &quot;three hundred&quot;, &quot;four hundred&quot;, &quot;five hundred&quot;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;&quot;six hundred &quot;, &quot;seven hundred&quot;, &quot;eight hundred&quot;, &quot;nine hundred&quot;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;String[] thousands = {null, &quot;one thousand&quot;, &quot;two thousand&quot;, &quot;three thousand&quot;, &quot;four thousand&quot;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;&quot;five thousand&quot;,&quot;six thousand&quot;, &quot;seven thousand&quot;, &quot;eight thousand&quot;, &quot;nine thousand&quot;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;       &lt;/span&gt;int y = 0, num = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;do {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;sys.print(&quot;Enter a number: &quot;); num = Integer.parseInt(q.readLine());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;if (num &amp;lt; 10000)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;y = 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;} while (y==0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;      &lt;/span&gt;int x = Integer.toString(num).length();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;switch (x)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;            &lt;/span&gt;case 1: {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;if (num == 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;sys.println(&quot;zero&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;sys.println(units[num]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;break; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;            &lt;/span&gt;case 2: {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;if (charAt(num,0) - &#39;0&#39; == 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;sys.println(tenths[charAt(num,1) - &#39;0&#39;]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;   &lt;/span&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;sys.print(special[charAt(num,0) - &#39;0&#39;]+&quot; &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;sys.println(units[charAt(num,1) - &#39;0&#39;]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;break; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;         &lt;/span&gt;case 3: {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;sys.print(hundreds[charAt(num,0) - &#39;0&#39;]+&quot; &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;if (charAt(num,1) - &#39;0&#39; == 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;sys.print(tenths[charAt(num, 2) - &#39;0&#39;]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else if (charAt(num,1) - &#39;0&#39; == 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;span style=&quot;mso-spacerun:yes&quot;&gt;   &lt;/span&gt;if (charAt(num, 2) - &#39;0&#39; != 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;sys.print(units[charAt(num, 2) - &#39;0&#39;]); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;sys.print(special[charAt(num, 1) - &#39;0&#39;] + &quot; &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;if (charAt(num,2) - &#39;0&#39; != 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;sys.print(units[charAt(num,2) - &#39;0&#39;]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;sys.println();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;break; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;  &lt;/span&gt;case 4: {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;sys.print(thousands[charAt(num,0) - &#39;0&#39;]+&quot; &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;if (charAt(num,1) - &#39;0&#39; != 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;sys.print(hundreds[charAt(num,1) - &#39;0&#39;]+&quot; &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;if (charAt(num,2) - &#39;0&#39; == 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;sys.print(tenths[charAt(num, 3) - &#39;0&#39;]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else if (charAt(num,2) - &#39;0&#39; == 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;span style=&quot;mso-spacerun:yes&quot;&gt;   &lt;/span&gt;if (charAt(num, 3) - &#39;0&#39; != 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;sys.print(units[charAt(num, 3) - &#39;0&#39;]); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;sys.print(special[charAt(num, 2) - &#39;0&#39;] + &quot; &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;if (charAt(num,3) - &#39;0&#39; != 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;sys.print(units[charAt(num,3) - &#39;0&#39;]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;sys.println();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;break; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://bufferedreader.blogspot.com/2011/05/java-program-numbers-to-words.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBXpwycNTN-bf9CK7QtyYjoyYSO4e4PnK7JteDfSaKwu15FmyWawDfQOJdnJIS5PLTub9H8gAqBoCreahpsDyqpeUEQ8E6ArHU5uWRklkN9_sazw_-FfMkLq1WnpGytpwu3W0KRlxsXzt4/s72-c/num1.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5783606277521267783.post-1261817092779706656</guid><pubDate>Sat, 29 Jan 2011 08:57:00 +0000</pubDate><atom:updated>2011-05-20T07:23:21.583-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">bill computation</category><title>Cellphone Bill Computation Program</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Problem:&lt;/span&gt;&lt;/b&gt;&lt;div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Write a program that calculates and prints the bill for a cellular telephone company. The company offers two types of service: regular and premium.  Its rates vary depending on the type of service. The rates are computed as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;Regular service:&lt;/i&gt;&lt;span style=&quot;mso-tab-count:1&quot;&gt;    &lt;/span&gt;$10.00 plus first 50 minutes are free. C&lt;/span&gt;&lt;/span&gt;harges for over 50 minutes are $0.20 per minute.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;Premium service&lt;/i&gt;:&lt;span style=&quot;mso-tab-count: 1&quot;&gt;   &lt;/span&gt;$25.00 plus:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left:1.25in;text-align:justify;text-indent: -.25in;mso-list:l0 level2 lfo1;tab-stops:list 1.25in&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-list:Ignore&quot;&gt;a.&lt;span style=&quot;font:7.0pt &amp;quot;Times New Roman&amp;quot;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;For calls made from 6:00 am to 6:00 pm, the first 75 minutes are free.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left:1.25in;text-align:justify;text-indent: -.25in;mso-list:l0 level2 lfo1;tab-stops:list 1.25in&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-list:Ignore&quot;&gt;b.&lt;span style=&quot;font:7.0pt &amp;quot;Times New Roman&amp;quot;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;For calls made from 6:00 pm to 6:00 am, t&lt;/span&gt;he first 100 minutes are free. Charges for over 100 minutes are $0.05 per minute.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Your program should prompt the user to enter an account number, a service code and the number of minutes the service was used. A service code for r or R means regular service, a service code of p or P means premium service. Treat any other character as an error. Your program should output the account number, type of service, &lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;number of minutes the telephone service was used and the amount due from user.&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;For premium service, the customer may be using the service during the day and the night. Therefore, to calculate the bill, you must ask the user to input the number of minutes the service was used during the day and the number of minutes th&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;e service was used during the night. Format your output to have two decimal places.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Sample Output:&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align:justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWhaJSeaIPbmYKkrd3iczLJtM-ccppedH21kape0aMhRo_p6GgqPCCpP7uhjzLqMRSjJBcvvLwDIhSCY-FV3wDirMaDXr774DYWsJ1h8yRqDQ_1spoJVa5ikG-wYLf-dFGfptYumlQuwhG/s400/num3.jpg&quot; style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 156px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5607957610903326306&quot; /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Codes:&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;div style=&quot;overflow:auto; height:300px; width:600px&quot;&gt;&lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;package javaapplication1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;import java.io.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;import java.text.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;public class num3 {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;private static PrintStream p=System.out;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;public static BufferedReader q=new BufferedReader (new InputStreamReader (System.in));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;public static void main(String[] args)throws IOException {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;p.print(&quot;Account Number: &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;String an=q.readLine();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;int AN=Integer.parseInt(an);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;p.println(&quot;Service code(Press R or P): \n&lt;span style=&quot;mso-spacerun:yes&quot;&gt;   &lt;/span&gt;R-Regular Service \n&lt;span style=&quot;mso-spacerun:yes&quot;&gt;   &lt;/span&gt;P-Premium Service&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;String sc=q.readLine();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;char SC=sc.charAt(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;DecimalFormat f = new DecimalFormat(&quot;#.##&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;if (SC==&#39;r&#39; || SC==&#39;R&#39; || SC==&#39;P&#39; || SC==&#39;p&#39;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;if (SC==&#39;r&#39; || SC==&#39;R&#39;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;p.print(&quot;Number of minutes the service was used: &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;String m=q.readLine();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;int M=Integer.parseInt(m);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;if (M&amp;gt;50)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;double c, tm;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;tm=M-50;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;c= 10.00 + (tm*0.20);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;p.println(&quot;Amount due: $&quot; +f.format(c));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;double amount;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;amount=10;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;p.println(&quot;Amount due: $&quot; +amount);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;else if (SC==&#39;P&#39; || SC==&#39;p&#39;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;p.print (&quot;Minutes called between 6:00am to 6:00pm: &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;String am=q.readLine();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;int AM=Integer.parseInt(am);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;double amDue=0, pmDue=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;if (AM==0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;amDue=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else if(AM &amp;lt;= 75)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;amDue=25;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;double min;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;min=AM-75;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;amDue=(min*.1)+25;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;       &lt;/span&gt;p.print (&quot;Minutes called between 6:00pm to 6:00am: &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;String pm=q.readLine();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;int PM=Integer.parseInt(pm);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;if (PM==0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;pmDue=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else&lt;span style=&quot;mso-spacerun:yes&quot;&gt;  &lt;/span&gt;if (PM &amp;lt;= 100 &amp;amp;&amp;amp; PM != 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;pmDue=25.00;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                 &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;else &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;double min2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;min2=PM-100;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;pmDue=(min2 * .05)+25;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;     &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                &lt;/span&gt;double Totaldue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;Totaldue=amDue+pmDue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;                    &lt;/span&gt;p.println(&quot;Total Amount Due: &quot; +f.format(Totaldue));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;            &lt;/span&gt;p.println(&quot;Invalid input!&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;mso-spacerun:yes&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNoSpacing&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;/div&gt;</description><link>http://bufferedreader.blogspot.com/2011/01/sample-template-only.html</link><author>noreply@blogger.com (BufferedReader)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWhaJSeaIPbmYKkrd3iczLJtM-ccppedH21kape0aMhRo_p6GgqPCCpP7uhjzLqMRSjJBcvvLwDIhSCY-FV3wDirMaDXr774DYWsJ1h8yRqDQ_1spoJVa5ikG-wYLf-dFGfptYumlQuwhG/s72-c/num3.jpg" height="72" width="72"/><thr:total>1</thr:total></item></channel></rss>