Help me to solve this assignments...

1. Write a program to print a triangle multiplication table as shown below:
0
0 2
0 3 6
0 4 8 12
0 5 10 15 20
0 6 12 18 24 30
0 7 14 21 28 35 42
2.Write a Java program that will display the factorial of the number 10.
3.Write a Java Program to display a four by four identity matrix
4.Write a program to calculate the sum of the odd integers between 1 and 99 using for loop.
kindly help me to solve this assignment.

Am I correct in all???
class Assignment
     public static void main(String args[])
          //This is to print the numbers in triangle
          for(int i = 1; i < 8; i++)
               for(int j = 0; j < i; j++)
                    System.out.print(" " + i*j);
               System.out.println("");
          //print value for 10 factorial
          int factorialvalue=1;
          int f=6;
          for(int l=f;l>1;l--)
               factorialvalue*=l;
          System.out.println("F values is "+factorialvalue);
          //4 x 4 Matrix
          for(int s=0;s<4;s++)
               for(int m=0;m<4;m++)
                    System.out.print("("+s+","+m+") ");
               System.out.println("");
          //sum of odd numbers up to 99
          int h=0;
          for (int b=1;b<10;b+=2)
               h+=b;
          System.out.println("Sum is "+h);
selva.

Similar Messages

  • Help me to solve this

    I can't view My JSP file I am getting Error Message
    Java Compile not Found
    Unable to Compile the Source file for JSP
    I copied tools.jar to servers lib dir
    But Yet i get the same message
    Pls help me to Solve this Problem

    Most common cause of the problem: JAVA_HOME environment variable not set, or set incorrectly.
    It should point to your java directory: ie C:\java1_4\ NOT C:\java1_4\bin
    Another possible cause is spaces in the path names where you have installed applications.
    Check out this page: http://www.coreservlets.com/Apache-Tomcat-Tutorial/ for a tutorial on installing tomcat.
    If you can't sort it out on your own, we need more info:
    Where have you installed Java?
    Where have installed Tomcat?
    What is the value of JAVA_HOME environment variable?
    Good luck,
    evnafets

  • Can  you help me to solve this problem (user-exit for xd02)

    Hi!
    can  you help me to solve this problem?
    transaction XD02
    To pass the length of the field to 7 max    for    KNA1-SORT   (Search criterion 1 )
    To pass the length of the field to 4  max   for   ADRC-SORT2  (Search criterion 2)
    It is not possible to save  the customer card as long as the search criterion is not univocal
    I seek one to use-exit .
    Thanks.

    Hi,
    Check the exit SAPMF02D.
    Regards,
    Surinder

  • Hello i have a unusual problem,anyway my iphone 4 wont turn on and when someone calls they hear ringing,but my phone doesent ring,so i open cimcas now ring off. Screen is just black,because it's turned off..Please help me to solve this problem..Thanks

    Hello i have a unusual problem,anyway my iphone 4 wont turn on and when  someone calls they hear ringing,but my phone doesent ring.So i poen simcase and now ring off. Screen is just  black,because it's turned off..Please help me to solve this  problem..Thanks

    As far as trying to power up your device, make sure it has a good charge and then hold the button on the top of the phone and the home button on the faceplate together until the apple appears on the screen.

  • Hi, when ever I'm using 3G, on my Iphone4 sim stops working and Network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem.

    Hi, when ever I'm using 3G, on my Iphone4 sim stops working and network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem. Thanks.

    Photos/videos in the Camera Roll are not synced. Photos/videos in the Camera Roll are not touched with the iTunes sync process. Photos/videos in the Camera Roll can be imported by your computer which is not handled by iTunes. Most importing software includes an option to delete the photos/videos from the Camera Roll after the import process is complete. If is my understanding that some Windows import software supports importing photos from the Camera Roll, but not videos. Regardless, the import software should not delete the photos/videos from the Camera Roll unless you set the app to do so.
    Photos/videos in the Camera Roll are included with your iPhone's backup. If you synced your iPhone with iTunes before the videos on the Camera Roll went missing and you haven't synced your iPhone with iTunes since they went missing, you can try restoring the iPhone with iTunes from the iPhone's backup. Don't sync the iPhone with iTunes again and decline the prompt to update the iPhone's backup after selecting Restore.

  • Hello Experts Please help me to solve this problem.

    Hello Experts,
    I am getting a problem while installing the SOLUTION MANAGER 4.0.
    in step 17/45 IMPORT ABAP :
    the problem is :
    ERROR 2008-04-29 03:10:28.110
    CJS-30023  Process call '/usr/sap/SLM/SYS/exe/run/R3load -testconnect' exits with error code 2. For details see log file(s) R3load.exe.log.
    when i saw R3load.exe.log file it has the following contain :
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    /usr/sap/SLM/SYS/exe/run/R3load: START OF LOG: 20080428095833
    /usr/sap/SLM/SYS/exe/run/R3load: sccsid @(#) $Id: //bas/700_REL/src/R3ld/R3load/R3ldmain.c#13 $ SAP
    /usr/sap/SLM/SYS/exe/run/R3load: version R7.00/V1.4 [UNICODE]
    Compiled Jul 14 2007 02:19:03
    /usr/sap/SLM/SYS/exe/run/R3load -testconnect
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    (DB) ERROR: db_connect rc = 256
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    (DB) ERROR: DbSlErrorMsg rc = 99
    /usr/sap/SLM/SYS/exe/run/R3load: job finished with 1 error(s)
    /usr/sap/SLM/SYS/exe/run/R3load: END OF LOG: 20080428095834
    Please can any body help me to solve this problem.
    waiting for fast response, as my installtion is pending due to this problem.
    have a nice day.
    Regards,
    Shivendra.

    Hi,
    The following should be verified:
    (1) check what DB instances the listener currently is aware of.  This can be done with the command 'lsnrctl services'.
    (in case you listener does not have the default name LISTENER, then use 'lsnrctl services <listener name>' )
    (2) Perhaps there is an issue with the dynamic instance registration, even though the error code is different, you should nevertheless check the points from note #563574.
    (3) Verfiy the value of the parameter local_listener (see mentioned note). Since you have changed the listener, the parameter might still be wrong.
    In case local_listener is correcly set you should give the command
      ALTER SYSTEM REGISTER;
    a try.
    Best Regards,
    Michael

  • Please help me to solve this date comparision issue..

    Please help me to solve this issue..
    If i have some data like the following..
    ID           START DATE             END DATE
    1             20080101              20080501
    1             20080502              20080630
    2             20080631              20080801
    2             20080802              20080901
                                                 ---------------> There is a break in date over here
    2             20080930              20081029
    2             20081030              20081130
    I need to compare the End Date with the start date (These data will not be in order)
    and find out if there is any break and should get the output date : *20080930*
    I am trying to do this in SQL or PL/SQL.Please help me .
    Thanks in advance.
    phani

    Hi Frank ,
    Sorry to bug you again. I ran your code on my actual data but not gettting the expected output.Here i am posting the actual code and the output that i got when i ran your code.Please bear with me and help me to solve this..
    /* Formatted on 5/25/2009 2:27:24 PM (QP5 v5.115.810.9015) */
    SELECT   member_nbr,
             aff_nbr,
             ymdeff,
             ymdend,
             gap_before,
             COUNT (gap_after)
                OVER (PARTITION BY member_nbr, aff_nbr ORDER BY ymdend DESC)
                AS gap_cnt
      FROM   (SELECT   member_nbr,
                       aff_nbr,
                       ymdeff,
                       ymdend,
                       CASE
                          WHEN ymdeff >
                                  LEAD(ymdend)
                                     OVER (PARTITION BY member_nbr, aff_nbr
                                           ORDER BY ymdend DESC)
                                  + 1
                          THEN
                             1
                       END
                          AS gap_before,
                       CASE
                          WHEN ymdend <
                                  LAG(ymdeff)
                                     OVER (PARTITION BY member_nbr, aff_nbr
                                           ORDER BY ymdend DESC)
                                  - 1
                          THEN
                             1
                       END
                          AS gap_after
    ------------I need this SQL to filter the whole data to the data that i posted in previous post -----
                FROM   (  SELECT   ms1.member_nbr, 
                                   ms1.aff_nbr,
                                   ms1.ymdeff,
                                   ms1.ymdend,
                                   ms1.void
                            FROM   (SELECT   ms.member_nbr,
                                             ms.aff_nbr,
                                             ms.ymdeff,
                                             ms.ymdend,
                                             ms.void
                                      FROM   MEMBER mb, member_span ms
                                     WHERE   mb.member_nbr = ms.member_nbr
                                             AND (20090523 BETWEEN ms.ymdeff
                                                               AND  ms.ymdend
                                                  AND TRIM (void) IS NULL)
                                             AND mb.member_nbr = 'A1000073000 ')
                                   eff_pcp,
                                   member_span ms1
                           WHERE   ms1.member_nbr = eff_pcp.member_nbr
                                   AND (SUBSTR (eff_pcp.aff_nbr, 1, 6) =
                                           SUBSTR (ms1.aff_nbr, 1, 6))
                        ORDER BY   ms1.ymdeff DESC)
    ---------- end of my part  ----------
                table_x) got_gaps;Outputs that i got when i ran that code for each individual members..
    Sorry to bug you frank and thanks for all the help.I will post here if i get any other data.
    Thanks
    phani

  • TS1363 My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue?

    My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue? I have already updated to the latest version of iTunes on my Windows 8 and I cannot synchronize my iPod for the time being. Please do help me to solve this problem. Thank You.

    uninstall all iTunes,5 programes,this worked for me after reinstall them

  • My Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    my Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    Carlos-
    Start by signing out and back in to see if it will see the subscription: 
    How to sign in and sign out of creative cloud (activate/deactivate)
    If the apps are installed fine and close after launch see this link:
    CC applications close immediately after launch
    If the problem is something different, please let us know the error you see or what is happening on the screen so we can advise  you on a solution
    Pattie

  • ýesterday  my iphone 5c screen  suddendly  shows connect to itune and i try to restore it using itune but halfway i got a message error occured (14). please help me in solving this problem.

    ýesterday  my iphone 5c screen  suddendly  shows connect to itune and i try to restore it using itune but halfway i got a message error occured (14). please help me in solving this problem.

    what did you learn when you search the internet for iPhone error 14?

  • Hello Sorry for the inconvenience, but I have a problem in Java I can not open files, audio chat, which type of jnlp after the last update of the Java 2012-004 Please help me in solving this problem.

    Hello Sorry for the inconvenience, but I have a problem in Java I can not open files, audio chat, which type of jnlp after the last update of the Java 2012-004
    Please help me in solving this problem. 

    Make sure Java is enable in your browser's security settings.
    Open Java Preferences (in Utilities folder)
    Make sure Web-start applications are enabled.
    Drag Java 32-bit to the top of the list.
    jnlp isn't an audio file format. It's just a java web-start program (Java Network Launching Protocol).

  • We have 'CS6' version of Adobe. We are facing a problem with 'Acrobat Pro'. Every month that is stop working and everytime need to install. Kindly help us regarding solving this problem...

    We have 'CS6' version of Adobe. We are facing a problem with 'Acrobat Pro'. Every month that is stop working and everytime need to install. Kindly help us regarding solving this problem...

    Your Acrobat is running in Trial Mode.  Try this KB: Creative Cloud applications unexpectedly revert to trial mode | CS6, CCM
    If it doesn't work you need to contact Adobe Support for assistance.

  • Hello to everyone : I have a problem every time I try to open iTunes for windows 8 64bit... Program stops to work every time trying to access to the store... Is anyone able to help me to solve this issue? Thank you so much...

    Hello to everyone : I have a problem every time I try to open iTunes for windows 8 64bit... Program stops to work every time trying to access to the store... Is anyone able to help me to solve this issue? Thank you so much...
    N.B. iTunes version is the last one available from https://apple.com/it

    Hey sweetcake74,
    Thanks for the question. I understand you are experiencing performance issues with iTunes for Windows. The following articles may help to resolve your issue:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/TS1717
    Thanks,
    Matt M.

  • My iphone 3gs is upgraded to ios 6.1.3 from ios 5.0.1 then it continues to shutting down then turning on i think that ios 6 is cannot carry by my iphone help me to solve this problem tnx

    my iphone 3gs is upgraded to ios 6.1.3 from ios 5.0.1 then it continues to shutting down then turning on i think that ios 6 is cannot carry by my iphone help me to solve this problem tnx

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Pay particular attention to Steps 3 and 4.
    When prompted... Choose Restore as New ( not from backup.)

  • Hi,I have 4s,I have a problem since 2days that the ring tone,lock sound,password sound,volume button and slide,calls flash,all sometimes working and sometimes not,plz help me to solve this problem.thanks

    HI
    i have iPhone 4s with iOS 8.1.3 , since 2 days I'm facing a problem that the ring tone,lock button sound,password sound,volume buttons,slide volume and incoming call flash,
    all these not working properly , sometimes it will work and sometimes it will not, I tried to restart the phone many times but I didn't fix the problem
    plz help me to solve this problem

    Try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again. You will not lose any data by resetting, but it can cure some glitches.
    If this does not help, setting it up as new device would be the next step:
    How to erase your iOS device and then set it up as a new device or restore it from backups

Maybe you are looking for

  • Create Inbound Delivery from Outbound Delivery create

    Hi, This is what I am trying to do... 1. Create PO (me21n) 2. Create Outbound Delivery based on PO (VL10g) 3. PGI (this creates a DELVRY03 IDoc) (IDoc is created at this step, no issues so far) 4. Based on the Outbound DELVRY03 IDoc I want to create

  • Mass Close of Process Orders

    Is there any way to close multiple process orders at the same time?  I'm using COHVPI for doing mass TECO but it doesn't have a close option. Thanks, Rosalind

  • Dock Icons will not stay in their place (CPU?)

    I have been having an issue with random dock icons not staying in their place. I move an icon to a place that makes it arranged correctly in terms of grouping or importance and it "slides" back to it's original place almost immediately. Or I will mov

  • MacBook Pro doesn't reconize hard drive

    My Mac book pro would not boot up. Only trouble I've had is it was getting slow to boot up I tried to reinstall OS X is it didn't show my hard drive. I put in a new 750 gig Western Digital and went to install OS X and I have the same problem I go to

  • TS1485 itunes is not compatible, windows user. please help

    My itunes would not connect with the online store and windows detected a problem. Checked under windows troubleshotter and it was incompatiable.