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)

pede po help sa prob ko, pa punan lng po kung anu dapat gamitin para mag stack ung amount input nito...

#include <iostream>
using namespace std;

int main()

{
int apple,total,amount;
char choice;
apple=10;
cout<<"The apple is 10php each\n";
do{
cout<<"How many would you like to buy?";
cin>>amount;
total=apple*amount;
cout<<"would you like to buy more? "<<endl;
cout<<"press y for yes and n for no";
cin>>choice;
}
while(choice!='n');
cout<<"the total amount is "<<total<<" Thank you for Buying";


return 0;
}


gusto ko lng po sanang mag stack yung amount, yung pic po sa baba ay yung result ng code na yan, anjan na po ang prob, sa oras na nag type ako ng 3 nakakalimutan yung 5 na input ko, pano po ba or anu po ba dapat para mag stack yhung unang input at pangalawa or tatlo...
 

Attachments

  • prob1.JPG
    prob1.JPG
    37.9 KB · Views: 7
sir patulong nman po sa project ko. Vb.net virtual piano. mkapag play na po ako ng audio. pero problem is one at a time lang. di ko ma play ng sabay ang mga notes. My.Computer.Audio.Play(My.Resources.filename.wav, AudioPlayMode.Background) po gamit ko na code. thnks in advance po. sana matulongan nyo po ako mga sir:pray: :praise::praise:
View attachment 157867
 

Attachments

  • audio.PNG
    audio.PNG
    10.8 KB · Views: 2
Last edited:
May ginagawa akong Jack N' Poy program. Isa 'to sa mga projects namin e.

Nag eend yung program kapag hinihingi na yung input sa Player 2:

Ito yung code:

#include<conio.h>
#include<stdio.h>
#include<ctype.h>

char p1,P1,p2,P2;

main()
{
clrscr();
gotoxy(35,10);
textcolor(7);
printf("JACK N' POY");
gotoxy(30,12);
cprintf("Player 1: ");
gotoxy(44,12);
scanf("%c",&P1);
if(P1=='P' ||P1=='S' ||P1=='R'){
gotoxy(30,14);
cprintf("Player 2: ");
gotoxy(44,14);
scanf("%c",&P2);
if(P2=='P' ||P2=='S' ||P2=='R'){
}

else if(P1=='P'&&P2=='R')
printf("Paper covers rock! Player 1 wins!");
else if(P1=='S'&&P2=='P')
printf("Scissors cut papers! Player 1 wins!");
else if(P1=='R'&&P2=='S')
printf("Rock breaks scissors! Plater 1 wins!");
else if(P1=='P'&&P2=='S')
printf("Scissors cut papers! Player 2 wins!");
else if(P1=='S'&&P2=='R')
printf("Rock breaks scissors! Plater 2 wins!");
else if(P1=='R'&&P2=='P')
printf("Paper covers rock! Player 2 wins!");

}

else
{
gotoxy(35,18);
textcolor(7);
printf("Invalid input!");
}


getch();
return(0);
}
 
Last edited:
help po sa mga master ng adobe flash cs6.. meron po ba kayong file ng karaoke made in adobe flash cs6..pa share naman po kahit basic karaoke lang. thanks
 
pwede po bang makahingi ng java program ung converter po.. kahit anong converter po with multi windows po.. penge po ng program nila hehehe thanks po ng marami.. :help:
 
boss pa help po sa vb. pagawa po boss ng code para sa update MS access po ung db ko.
tbl name = "info" 2fields = "eid" - autonum at "ename" - text

eto po ung code ko kaso po "syntax error UPDATE statement" namn daw po

Dim sqlCommand As String = "UPDATE info SET [eid] = '" & TextBox1.Text & "'," & "ename ='" & TextBox2.Text & "'," & "WHERE [eid] = '" & TextBox1.Text & "'"
performNonQuery(connectionString, sqlCommand)

pahelp po boss ty ty
 
sir pwede po pa help sa java inventory po kunyari sa lab. may humiram ng test tube sa inventory mababawasan po ng isa at nakalagay po yung name ng humiram at student number
 
Mga master po sa adobe flash cs6.. help naman po sa karaoke sa adobe flash.. ang hirap po gumawa sasabog na utak ko huhu pls po sana may makahelp handa ako mgabigay ng kapalit. kahit basic karaoke lang po thanks
 
pa.help po mga sir, bago lang po ako sa visual studio 2010........may ginawa po akong project which is DJ Sampler effects, ang problema ko po is hindi ko alam kung paano mag.load and save ng audio files in picturebox para ma.play. sana po mga sir matulungan ninyo ako..:pray::pray::pray::praise::praise::help::help:
 
HELLO PO MGA MASTER SA JAVA.
NEED KO PO NG HELP N GUI PROGRAM.
YUNG PROGRAM PO NA SYSTEM RESERVATION. KAHIT ANONG SYSTEM RESERVATION PO MINIMUM PO NG 10 FRAMES :)
BAKA MERON PO KAYO MGA IDOL PA EMAIL NALANG PO SA [email protected] or Facebook.com/AlexPogixD
MARAMING SALAMAT PO :)
 
sino po marunong mag code para sa java game gamit ang netbean yung match game. yung e mamatch mo ang photo. salamat po.
 
Sir pano po gumawa ng file manager sa android java yung ginamit kahit yung delete and rename lang po.
 
package memories;

/**
*
* @author Raf
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Memories extends JFrame implements ActionListener {
private JButton exitbut, startbut, helpbut, pausebut, mybutton[];

private JPanel lowpanel,highpanel, mainpanel;
private JLabel timel, missedl, dtime;
private JTextField timef, missedf;
private JComboBox timeCOMBO;
private GridLayout grid;
private ImageIcon myicons[],intro;
private int TimeCount = 0,MissedCount = 0,first = 0,placer,pos,selected = 0;
private int ranpos,rannum,takenAR[],doubleAR[],picAR[],match = 0;
private String iconbasename="myIcon1", iconsuffix=".gif";

private String[] myCombo = { "1/4 second","1/2 second","1 second","2 seconds" };
private Timer increment, flipdelay;
private PicHandler picH = new PicHandler();

// set up GUI
public Memories()
{
super( "Program 2 - Memory Game" );

// get content pane and set its layout
Container container = getContentPane();

// panels:
lowpanel = new JPanel();
lowpanel.setLayout(new FlowLayout());
lowpanel.setBorder(BorderFactory.createRaisedBevelBorder());
highpanel = new JPanel();
highpanel.setLayout(new FlowLayout());
highpanel.setBorder(BorderFactory.createTitledBorder("Menu"));

ButtonHandler handler = new ButtonHandler();

// top panels buttons:
startbut = new JButton("Start Game");
startbut.addActionListener(handler);
helpbut = new JButton("Instructions");
helpbut.addActionListener(handler);
pausebut = new JButton("Pause");
pausebut.addActionListener(handler);
exitbut = new JButton("Quit");
exitbut.addActionListener(handler);

dtime = new JLabel("Delay Time:");
final JComboBox timeCOMBO;
timeCOMBO = new JComboBox(myCombo);
timeCOMBO.setSelectedIndex(2);
timeCOMBO.addActionListener(new ActionListener() { // changing time for cards to flip
public void actionPerformed(ActionEvent e) {
String newMode = (String)timeCOMBO.getSelectedItem();
switch (newMode) {
case "1/4 second":
flipdelay = new Timer(250,picH);
break;
case "1/2 second":
flipdelay = new Timer(500,picH);
break;
case "1 second":
flipdelay = new Timer(1000,picH);
break;
default:
flipdelay = new Timer(2000,picH);
break;
}
}
});

//bottom panel items:
timel = new JLabel("Time:");
timef = new JTextField(6);
timef.setEditable(false);

missedl = new JLabel("Missed:");
missedf = new JTextField(3);
missedf.setEditable(false);

// adding things to top panel:
highpanel.add(startbut);
highpanel.add(helpbut);
highpanel.add(pausebut);
highpanel.add(exitbut);
highpanel.add(dtime);
highpanel.add(timeCOMBO);

// adding things to bottom panel:
lowpanel.add(timel);
lowpanel.add(timef);
lowpanel.add(missedl);
lowpanel.add(missedf);

//setting up middle
myicons = new ImageIcon[12];
intro = new ImageIcon("myIcon1.gif");

for (int i=0; i < (myicons.length); i++) {
myicons = new ImageIcon ( iconbasename + Integer.toString(i+1) + iconsuffix );
}

takenAR = new int [myicons.length*2]; //array that will tell when picture is already in spot
mybutton = new JButton[myicons.length*2];//Allocate Labels for the pictures to go in
picAR = new int [myicons.length*2]; //array that will randomize the pictures
doubleAR = new int [myicons.length]; //array that tell if pictures has been used twice

grid = new GridLayout(4,6); //make a grid pattern in middle
mainpanel = new JPanel();
mainpanel.setLayout(grid);

for (int i=0; i < myicons.length*2; i++) { //Fill Labels with Pictures
mybutton = new JButton( intro );
mybutton.setToolTipText( "Pic: " + (i+1) );
mybutton.addActionListener(picH);
mainpanel.add( mybutton );
}


// adding the top and bottom panels:
container.add(lowpanel, BorderLayout.SOUTH);
container.add(highpanel, BorderLayout.NORTH);
container.add(mainpanel, BorderLayout.CENTER);

// Set Timer
increment = new Timer(1000, this);

//Set default
timef.setText(Integer.toString(TimeCount));
missedf.setText(Integer.toString(MissedCount));

setSize(700, 580);
setVisible( true );
}

// execute application
public static void main( String args[] )
{
Memories application = new Memories();

application.addWindowListener(
new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
);
}


//************************************************************
// This class handles timer events
//

public void actionPerformed (ActionEvent e) {
if (e.getSource() == increment) {
TimeCount++;
timef.setText(Integer.toString(TimeCount)); //increment timer on display
}
}

//************************************************************
// This class will handle all events when a menu button is clicked
//
private class ButtonHandler implements ActionListener {
private int ampaused = 0;

@Override
public void actionPerformed( ActionEvent e ) {
// start game button:
if(e.getSource() == startbut) {
randompics(); //randomize array
if (first == 0) {
startbut.setText("Restart");
}
else {
for (int i=0; i < myicons.length*2; i++) {
mybutton.setIcon( intro );
}

increment.stop(); //reset variables
TimeCount = MissedCount = match = selected = 0;
missedf.setText(Integer.toString(MissedCount));
}

first++;
increment.start();
}

// instructions button:
else if(e.getSource() == helpbut) {
increment.stop(); //pause game
JOptionPane.showMessageDialog(null,
"Instructions: \n\n* Click the Start Game Button to Launch the Game." +
"\n* Any time after the initial start, press the Restart button to reset." +
"\n* Click any picture and try to find it's match." +
"\n* Any wrong match will increment the missed match counter." +
"\n* For each wrong match a second will be added to your total score." +
"\n* You can change the time the cards stay visible by clicking 'Change Delay Time'." +
"\n* The Lower your score, the better you are!" +
"\n* The game ends after all pictures have been matched." +
"\n* Thanks for Playing and Have Fun!","Welcome To The Memory Game",1);
if ((first != 0) && (!"Play".equals(pausebut.getText())) && (match != 12)) {
increment.start();
} //restart game if needed
}

//pause button:
else if(e.getSource() == pausebut) { //pause and resume game
if ((increment.isRunning()) && (ampaused == 0)) {
pausebut.setText("Play");
increment.stop();
ampaused = 1;
}
else if (ampaused != 0){
pausebut.setText("Pause");
increment.start();
ampaused =0;
}
}

// exit button:
else if(e.getSource() == exitbut) { //exit the game
increment.stop();
JOptionPane.showMessageDialog(null, "Thank You!\nCome Again!!");
System.exit(0);
}
}
} // end ButtonHandler

//************************************************************
// This class will handle all events when a picture is clicked
//
private class PicHandler implements ActionListener {
private int hold1, hold2, hold3, hold4, oldselection,j;

public PicHandler()
{
flipdelay = new Timer(1000,this);
}

@Override
public void actionPerformed( ActionEvent e ) {
if (increment.isRunning()) { //if game has started

if (e.getSource() == flipdelay) { //Allow user to see wrong answer be4 flipping
mybutton[hold4].setIcon(intro); // reset pics to starting pic
mybutton[hold3].setIcon(intro);
flipdelay.stop();
}
else if(!flipdelay.isRunning()) { //pics not flipped for user to select more

for (j = 0; j < (myicons.length*2);j++) { //find which icon had an action
if ((e.getSource() == mybutton[j]) && (takenAR[j] != 7) ) { //if button that was pressed
//and not matched
if (selected < 1) { //if first pic user selected
selected++;
hold1 = oldselection = picAR[j]; // holding old pics and flipping picture
hold3 = j;
mybutton[j].setIcon(myicons[hold1]);
}
else { //if second pic user selected
if (!(j == hold3)) { //if user doesn't select same pic twice
hold2 = picAR[j];
if (hold2 == oldselection) { //if pics matched
match++;
takenAR[hold3] = 7; //set pics as matched and flip
mybutton[j].setIcon(myicons[hold2]);
takenAR[j] = 7;

if (match == 12) { // if found all picture matches
increment.stop();
JOptionPane.showMessageDialog(null,"You Won!\nTime: " +
TimeCount + " seconds\nMisses: " + MissedCount +
"\nTotal Score: " + (TimeCount + MissedCount) +
"\n\nPress Restart to play again or Quit to leave!");
}
}
else {
mybutton[j].setIcon(myicons[hold2]);
hold4 = j;
flipdelay.start();
MissedCount++;
missedf.setText(Integer.toString(MissedCount));
}
selected = 0;
}
}

j = myicons.length*2; //exit loop
}
}
} //end else - delay hit
}
}
}

private void randompics() {
for (int i=0; i < myicons.length*2; i++) {
takenAR = 0;
}

for (int i=0; i < (myicons.length); i++) {
doubleAR = 0;
}

for (int i=0; i < myicons.length*2; i++) {
placer = getran();
pos = getpos();
picAR[pos] = placer;
takenAR[pos] = 1;
doubleAR[placer]++;
}
}



private int getran () {
rannum = (int)Math.round((Math.random())*(myicons.length-1));
if (doubleAR[rannum] == 2) {
getran();
}
return rannum;
}



private int getpos () {
ranpos = (int)Math.round((Math.random())*((myicons.length*2)-1));
if (takenAR[ranpos] == 1) {
getpos();
}
return ranpos;
}

}
 
mga sir pano po mag create ng java program na 20 questions and answer na without repetition
 
Re: hard disk hider

ts patulong nman... wla po akong alam sa programming.. my gusto po ako gawin sa p.c. ko
ung tipong naka hide ung drives nya pero nagana po ung games on desktop shortcut..
meron po ako software na na google... ok nman cya kc my password.. ang gusto ko mangyari ts
ganito, ung software n nkita ko is maganda kc kahit ikabit mo s ibang p.c. or i slave mo di mo cya
m access kng di mo alam ang password.. ( w/c s good). ang gusto ko uli mangyari t.s.,
pano b gawin ung automatic cya mag type ng password pag boot up ng unit (ung prang nsa start up ung command)
don mismo sa o.s. n kinabitan nung hard disk.
ang main purpose ko tlaga dito ts is pra di nla m copy ung mga games ko... kc ang hirap mag install
into 500gb tpos i slave lng nila s ibang unit den instant copy or clone agad cla..

patulong nman t.s.
pcenxa npo.. ala tlaga ako alam s programming...
salamat po in advance
 
Back
Top Bottom