1. Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as:

    All that and more! Registration is quick, simple and absolutely free. Join our community today!

C# Help

Discussion in 'Coding, Programming' started by rapandreifontaron, Dec 9, 2015.

  1. Write a program that calculates and produce these two columns sequence number using the three looping statements :

    sequence no.
    1
    2
    3
    4
    5
    squared
    1
    4
    9
    16
    25
     
  2. int main()
    {
    int j; //define a loop variable

    for(j=1; j<5; j++) //loop from 1 to 6,
    cout << j * j << " "; //displaying the square of j
    cout << endl;
    return 0;
    }

    output
    1
    4
    9
    16
    25
    *****************************************************
    try mo nga po yan..wala c++ pc ko weh

    int number = 1;
    while(number <= 5)
    {
    cout << number << endl;
    number = number + 1;
    }

    output
    1
    2
    3
    4
    5
    **********************
    try mo po..then edit mo na lang po

    TheScriptTheScript check mo nga kung tama :hilarious::hilarious:
     
  3. san po ilalagay yang output pa code nga po yung buo baguhan lng po kase
     
  4. :dead:

    lagay mo lang yung umpisa na

    #include.iostream yata
    #conio.h

    yung ganyan..nalimutan ko na weh..try mo muna irun
     
  5. may error mo 5 yung mga // ganyan yung nag error
     
  6. #include <stdio.h>
    #include <conio.h>

    main()

    {

    int num, squ;

    num = 0;

    squ = num * num;

    printf("\nnumber\tsquare\n");

    printf("%d\t%d\t%d\n\n", num, squ);

    getch();

    return 0;
    }

    try mo nga yan
     
    Last edited by a moderator: Dec 9, 2015
    Draft likes this.
  7. #include <iostream>
    using namespace std;
    int main()
    {
    int i;
    for(i=0; j<5; i++)
    cout <<i<< “ “;
    cout << \n;
    return 0;
    }

    output
    1
    2
    3
    4
    5



    *****************************


    #include <iostream>
    using namespace std;
    int main()
    {
    int j;
    for(j=1; j<6; j++)
    cout << j * j << “ “;
    cout << \n;
    return 0;
    }

    Here’s the output:
    0
    1
    4
    9
    16
    25


    irun mo pareho yan
     
  8. // fordemo.cpp
    // demonstrates simple FOR loop
    #include <iostream>
    using namespace std;

    int main()
    {
    int j; //define a loop variable

    for(j=0; j<15; j++) //loop from 0 to 14,
    cout << j * j << " "; //displaying the square of j
    cout << endl;
    return 0;
    } Counter Strike :)
     
  9. Salamat po nagawa ko na po mag Isa pero Try ko rin po yung mga SUGGEST nyo para lalo ako matuto SALAMAT mga ka PHC . SALUDO ako sa inyo gagaling nyo grabe :)
     
Tags / Keywords: