Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

All about programming (Specially c, c++, VB, Java)

mga kuya p elp nmn po... pno po plabasin ang ganitong output?

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

pls po.. ty sa mg rereply
 
looping at arrays lang poh yan.. siguro as of now wala pa kaung arrays..
 
mga kuya p elp nmn po... pno po plabasin ang ganitong output?

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

pls po.. ty sa mg rereply

simpleng sagot sa simpleng tanong;


Code:
#include<iostream>
using namespace std;
int main()
{
       cout << "*****\n****\n***\n**\n*\n**\n***\n****\n*****\n"

       system("pause")
       return 0;
}
 
Hi mga bro bago lng po ako sa programing at medyo nahihirapan ako 1st year plang po ako kumukuha ng cs can you please help me about this one

Write a C Program that will input a number and convert it to Roman Numerals from 1 - 3000.

Sample Output:

Enter any number from 1 - 3000: 6
The Roman Numeral is VI

this will mean a lot to me thank you :)
 
Welcome sa symbianize :thumbsup:

kailangan mo jan ng modulus operations and if else statements and simple string manipulation. pag pasensyahan mo na, hindi ko maico-compile tong ibibigay ko sayo, at hindi buong codes din.

try tayo sa isang random number, say 2010, at ilagay natin sa variable na num.

una, alamin natin kung ilang 1000 meron sa 2010, para gawin yun, mod mo sya with 1000

2010 % 1000

lalabas jan, ung remainder when you divide 2010 by 1000, so 2010 / 1000 = 2 remainder 10. ung remainder na un, ibawas natin sa ating original na number. so 2010 - 10 = 2000.

yan, alam na natin kung ilang 1000 meron sa 2010. ngayon, if else statement na tayo

if our result = 1000

add "M" to our string ouput

else if our result = 2000

add "MM" to our string output

else if our result = 3000

add "MMM" to our result.


yan sir, may pattern ka na para sa thousands place, modify mo na lang sya for hundreds, tens and ones.
 
Last edited:
Sir thank you po sa welcome :)
ok na po yan malaking tulong na po medyo nakuha ko po ung logic nya may nakita din po ako sa forum ntn ung convert nmn po sya numbers to words pero hnd ko gaano ma gets yung logic nya pero now i think i understand na sir thank you very much ngayon pagaaralan ko po muna sya and try to run it thank you thank you. I really appreciate because your helping a complete stranger thanks again
:clap:

Finally na tapos ko din thanks for the help po :D
 
Last edited:
hi sir.. can you give me an sample codes sa inventory system where pwede e formulate niyaang re-orderentry point at stock on hand.. o sa simply salita pwede mo ko bigyan ng sample codes mo sa ng inventory using vb.net 2003 at sql ang dta base.
 
Hi mga bro bago lng po ako sa programing at medyo nahihirapan ako 1st year plang po ako kumukuha ng cs can you please help me about this one

Write a C Program that will input a number and convert it to Roman Numerals from 1 - 3000.

Sample Output:

Enter any number from 1 - 3000: 6
The Roman Numeral is VI

this will mean a lot to me thank you :)

gawa ka array for each.. or modulo operation.. 3k diba?

pde na ganito..

string thou[]={"","M","MM","MMM"};
cin>>x;/*bale eto yung input.assuming 3000*/
y= /*lagay mo dito yung kay dood na operation*/
cout<<thou[y];
 
hi po otor.. pa help po,, nid ko po kasi gumawa ng c++ na code about sa tic-tac-toe,, ahm ung pnapagawa po samin is 10x10,, tas 5 in a row imbis na 3,, pano po ung logic niya using borland c++?? tnx po
 
gawa ka ng interface ng game mo, tapos dun natin umpisahan. suggest ko para sa mismong board, gumamit ka ng 2 dimensional array.
 
Patulong naman po sa Java program ko. btnMin not functioning well. When I try to click btnFill then btnMin it works perfectly fine, but when I try to click btnFill, btnSort, btnMax and btnMin consecutively btnMin not working. Please help me.

Code:
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import java.util.*;  

public class array extends Applet implements ActionListener
{
    Button btnFill = new Button("Fill Array");
    Button btnSort = new Button("Sort");
    Button btnMax = new Button("Find Maximum");
    Button btnMin = new Button("Find Minimum");
    TextArea Display = new TextArea(10,20);
    Label lblMaxMin = new Label("##################");
    int[] myArray = new int[5];
    int x;
    String strOutput = "";

public void init()
{
    Panel pnl1 = new Panel();
    Panel pnl2 = new Panel();
    Panel pnl3 = new Panel();

    pnl1.setLayout(new GridLayout(4,0));
    pnl1.add(btnFill);    btnFill.addActionListener(this);
    pnl1.add(btnSort);    btnSort.addActionListener(this);
    pnl1.add(btnMax);    btnMax.addActionListener(this);
    pnl1.add(btnMin);    btnMin.addActionListener(this);

    pnl2.setLayout(new GridLayout(1,1));
    pnl2.add(Display);

    pnl3.setLayout(new GridLayout(6,0));
    pnl3.add(lblMaxMin);
    add(pnl1);
    add(pnl2);
    add(pnl3);
}

public void actionPerformed(ActionEvent a)
{
    Object Obj = a.getSource();

    if(Obj == btnFill)
    {
      Display.setText("");
      for(int x=0; x<myArray.length; x++)
      {
        myArray[x] = (int)(Math.random()*100)+1;
        Display.append("[" + (x+1) + "]" + "   " + myArray[x] + "\n");
      }
    }

    else if(Obj == btnSort)
    {
      Display.setText("");
      Arrays.sort(myArray);
      for(int x=0; x<myArray.length; x++)
      {
        Display.append("[" + (x+1) + "]" + "   " + myArray[x] + "\n");
      }
    }

    else if(Obj == btnMax)
    {
      lblMaxMin.setText("");
      int max = myArray[0];
      for(int x=0; x<myArray.length; x++)
      {
        if(myArray[x] > max)
        {
        max = myArray[x];
        lblMaxMin.setText("Maximum Number =" + max);
        }
      }
    }

    else
    {
      lblMaxMin.setText("");
      int min = myArray[0];
      for(int x=0; x<myArray.length; x++)
      {
        if(myArray[x] < min)
        {
        min = myArray[x];
        lblMaxMin.setText("Minimum Number =" + min);
        }
      }
    }
}
}
 
opo nagawa ko na,, kaso ndi ko lam kung paano ung pag nilagay ung 5 row na x magwiwin na tas kung paano papasok ung computer maglalaro??
 
gawa ka ng function na mag check ng iyong winning condition, tapos call mo everytime na mag make ng move yung players. un muna unahin natin bago un A.I., madugo ung part na un.
 
COOL... galing STIers.. hahaha STI din ako santa rosa... I need help sa AJAX... Nag self study ako sa ajax di ko maintindihan! duh! cno marunong pahelp naman :D hihi
 
gawa ka ng function na mag check ng iyong winning condition, tapos call mo everytime na mag make ng move yung players. un muna unahin natin bago un A.I., madugo ung part na un.


pano po,, un nga po nahihirapan ko eh...
 
post mo dito nagawa mo na, tignan natin kung pano natin dadagdagan.
 
Back
Top Bottom