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)

sir pa help po sa Polynomial addition,
Using C++;
Sample Input:

string poly1 = 4x^5 + 3x^4 + 3x + 10;
string poly2 = 4x^5 + 3x^4 + 3x + 10;

Remember what you learned from algebra:

Add only like terms, and only add the numerical coefficients.

So since both polynomials are the same just multiply by 2 all the terms.

2(4x^5.....) via distrubutive property.
 
sir pa help po sa Polynomial addition,
Using C++;
Sample Input:

string poly1 = 4x^5 + 3x^4 + 3x + 10;
string poly2 = 4x^5 + 3x^4 + 3x + 10;

Remember what you learned from algebra:

Add only like terms, and only add the numerical coefficients.

So since both polynomials are the same just multiply by 2 all the terms.

2(4x^5.....) via distrubutive property.
 
help po pls pls..

#include <iostream>

using namespace std;

int main()
{
float a,b,sum,diff,product,qoutient;

cout<<"enter a number one :";
cin>>a;
cout<<"enter a number two :";
cin>>b;
{


if
(a>b){
sum=a+b;
cout<<"the sum is : "<<sum;
product=a*b;
cout<<"\nthe product is: "<<product;
}


else if

(a<b);{
diff=a-b;
cout<<"the diff is :"<<diff;
qoutient=a/b;
cout<< "the qoutient is:<<qoutient";

}

if
(a=b);{
sum=a+b;
cout<<"the sum is : "<<sum;
diff=a-b;

cout<<"the diff is :"<<diff;
product=a*b;
cout<<"\nthe product is: "<<product;
qoutient=a/b;
cout<< "the qoutient is"<<qoutient;
}
}







return 0;
}
 
patulong po sa paggawa ng GUI ng system nmin sa V.S 2010 newbie lng po ako sa C# ehh :)
 
Mga sir penge naman pong mga tips sa C programming yung mga kailangan ko pong malaman. Para po kahit papano may alam ako pag nagkklase po kame. :D
 
Sir may tanong po ako, pano po kaya ia-access ung data na nasa .dat file? Kasi po gagawa sana kami ng android application for weather forecasting. Yung data na kukunin po ay nasa .dat file. Pano po kaya kukunin un??? >.<
 
Sir may tanong po ako, pano po kaya ia-access ung data na nasa .dat file? Kasi po gagawa sana kami ng android application for weather forecasting. Yung data na kukunin po ay nasa .dat file. Pano po kaya kukunin un??? >.<

.dat lang talaga ang source?
Why not use sqlite as data storage?

Anyway... this might help...
Got it somewhere in the net...

InputStream inputStream = getResources().openRawResource(R.raw.dictionary);
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));

//then start reading lines from reader with reader.readLine()
 
.dat lang talaga ang source?
Why not use sqlite as data storage?

Anyway... this might help...
Got it somewhere in the net...

Opo. Ah kasi po may software na WeatherLink, nakainstall na po sya sa pc, tapos nagse-save po ung data na nakukuha ng software sa .dat file. Java naman po ata gawa ung software eh. Try ko po ung sample code mo. Salamat po! ^^
 
post your programming problems here....
tapos sample input and output...,,

i'll do my very best para po matulungan kayo

ang anyone who wants to help you're all welcome here...

welcome

:clap: :excited: :dance: :yipee: :beat:

skul project namin panu gawin ung caclculator sa c# language ..
na patuloy siyang aacept ng ilang input at ilang operation???


:h:help::help::help:help: :praise::praise::praise::praise::praise:
 
pa spoon feed po kung pano ko sisimulan to?:praise:
attachment.php
 

Attachments

  • Capture.PNG
    Capture.PNG
    19 KB · Views: 63
alam ko po yung algebra, what I mean is the string manipulation of those strings using VC++ MSF[Dialog based] :)
 
Remember what you learned from algebra:

Add only like terms, and only add the numerical coefficients.

So since both polynomials are the same just multiply by 2 all the terms.

2(4x^5.....) via distrubutive property.

Remember what you learned from algebra:

Add only like terms, and only add the numerical coefficients.

So since both polynomials are the same just multiply by 2 all the terms.

2(4x^5.....) via distrubutive property.

Alam ko pp yung algebra, what I mean is the string manipulation of those strings, using VC++ MFC Dialog Based. :D
 
Give the sysntax and example program.

Control Statement

1. If Statement
2 .If else Statement
3 For Statement

paturo po sa may alam. :praise:

(JAVA Prog.)
 
Sir, Sakin naman po ang problema lang sa java calculator ko is halimbawa nag add ako ng 2 numbers like 1+1 ang answer na binibigay sakin is "2.0" imbis na "2" lng

ung ginamit kong data type is Double

Tapos gumamit lng ako ng Char para naman sa shortcut ng mga operators na +, -, /, *, using "Case" and "Break"

Sana makahelp kayo sakin


Code:
package JCalculator;

import java.text.DecimalFormat;
import javax.print.DocFlavor;


public class NewJFrame extends javax.swing.JFrame {
    double total1 = 0;
    double total2 = 0;
    double plusminus;
    
    char math_operator;
    
    int Decimal1;
    
   
    
    public NewJFrame() {
        initComponents();
    }
    private void getOperator(String btnText) {
        math_operator = btnText.charAt(0);
        total1 = total1 + Double.parseDouble(jTextField1.getText());
        jTextField1.setText("");

private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {                                            
        
    }      

private void ClearActionPerformed(java.awt.event.ActionEvent evt) {                                      
      total2 = 0;
      jTextField1.setText("");  


private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
       jTextField1.setText(jTextField1.getText() + jButton1.getText());
        
    }        


private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {                                         
       jTextField1.setText(jTextField1.getText() + jButton5.getText());
    }  


private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        jTextField1.setText(jTextField1.getText() + jButton2.getText());
    }   


private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        jTextField1.setText(jTextField1.getText() + jButton3.getText());
    }  


private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        jTextField1.setText(jTextField1.getText() + jButton4.getText());
    }   


private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        jTextField1.setText(jTextField1.getText() + jButton6.getText());
    } 


private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {                                         
       jTextField1.setText(jTextField1.getText() + jButton7.getText());
    } 


private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {                                         
       jTextField1.setText(jTextField1.getText() + jButton8.getText());
    } 


private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {                                         
       jTextField1.setText(jTextField1.getText() + jButton8.getText());
    } 


private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {                                          
        jTextField1.setText(jTextField1.getText() + jButton10.getText());
    } 


private void PlusActionPerformed(java.awt.event.ActionEvent evt) {                                     
        String button_text = Plus.getText();
        
        getOperator(button_text);
    } 


private void EqualsActionPerformed(java.awt.event.ActionEvent evt) {                                       
        switch ( math_operator ) {
case '+':
total2 = total1 + Double.parseDouble(jTextField1.getText());
break;
case '-':
total2 = total1 + Double.parseDouble(jTextField1.getText());
break;
case '/':
total2 = total1 + Double.parseDouble(jTextField1.getText());
break;
case '*':
total2 = total1 + Double.parseDouble(jTextField1.getText());
break;
}

        jTextField1.setText( Double.toString(total2) );
        total1 = 0;
    }                                      

    private void DecimalActionPerformed(java.awt.event.ActionEvent evt) {                                        
        if (Decimal1==0)
        jTextField1.setText(jTextField1.getText()+Decimal.getText());
        Decimal1 = 1;
    }                                       

    private void PlusminusActionPerformed(java.awt.event.ActionEvent evt) {                                          
    plusminus=(Double.parseDouble(String.valueOf(jTextField1.getText())));
    plusminus=plusminus*(-1);
    jTextField1.setText(String.valueOf(plusminus));
    }                                         

    private void SubtractActionPerformed(java.awt.event.ActionEvent evt) {                                         
        String button_text = Subtract.getText();
        getOperator(button_text);
    }       


private void DivideActionPerformed(java.awt.event.ActionEvent evt) {                                       
        String button_text = Divide.getText();
        getOperator(button_text);
    }    


private void MultiplyActionPerformed(java.awt.event.ActionEvent evt) {                                         
        String button_text = Multiply.getText();
        getOperator(button_text);
    }   


public static void main(String args[]) {
        
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new NewJFrame().setVisible(true);
            }
        });
    }
 
Last edited:
patulong sa java.. Email validation.. without the use of importing library for regex..

1st try:
----------------
Input:
Enter your email: [email protected]

Output:
your email is not valid..

2nd try:
----------------
Input:
Enter your Email: [email protected]

Output:
Your email is valid...


-------------------------------------------------------------------------------
dpat po ang email at [email protected] and ang mga special character n ggmitin lng ay " -,@,. " .. at always .com lng..

sana po scanner para maintindhn ko ^_^ ... thanks mga boss kung matulungan nyo ko...
 
patulong po ako, simple program lng po sya.

ito ung program: (c++)

Given: # of branches
Resistances
Voltage Supply

Output: Branch currents


you can txt me 09494231298 or email [email protected]
 
Last edited:
Sa mga Visual Basic Application Programmer pwede ho bang magtanong :help: :help:

panu po ang codings neto if magpprompt sa kabilang cell na

ang time na 10 to 11 and 10:30 to 11 isa parehas na

then ung room din.


kapag nasagutan nyu po yan maraming salamat

:praise:
:praise:
:praise:
 

Attachments

  • untitled.bmp
    576.1 KB · Views: 4
Back
Top Bottom