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)

help po sa LAN ENROLLMENT SYSTEM WITH VIEWING OF GRADES

vb6, adodc and ms access

big thanks...

UP..:pray:
 
guys tanung lang po sa mga vb6 programmers dyan. anu pong best na alternative sa system time? need kasi ng system ko na accurate ang time eh. hmn. ung kahit palitan ang system time is accurate parin yung time nya. any ideas? :thanks: in advance.
 
sir.. pahelp po about sa c++.

Codes/Program about PRIME AND PRIME FACTORIZATION.

kelangan ko ng program na if PRIME NUMBER ang gi-input ko,
mag-ooutput sya ng "PRIME",

and if COMPOSITE NUMBER naman ang gi-input ko,
e-ooutput nya ung PRIME FACTORS...


output example:

enter a number: 3
<< prime

enter a number: 8
<< 2 2 2 or (2x2x2) or (2.2.2)


Thanks...
 
mga sir panu po ito ?

attachment.php


pa Edit naman po itong code ko thanks :thumbsup:

Code:
[FONT="Courier New"]#include <conio.h>
#include <stdio.h>
int main()
{
    int val=10;
    int num=0, lst[val], odd[val], lstctr=0, oddctr=0,sum=0;
    for(int x=0; x<val; x++)
    {
            scanf("%d",&num);
            
            if(num%2==1)
                
            {
                odd[oddctr] = num;
                sum+=odd[oddctr];
                oddctr++;
            }
            if(x<val)
            {
                     lst[lstctr] = num;
                     lstctr++;
            }
            
    }
    
    printf("\n\nList\tODD");
    
    for( int i = 0; i < val; i++ )
    {
         
        if(i < lstctr)
         {
             printf("%i", lst[i]);
         }
         else
         {
             printf("");
         }
         
         if(i < oddctr)
         {
             printf("\n%i\t", odd[i]);
         }
         else
         {
             printf("\n \t");
         }
         
         
    }
    printf("Sum of Odd # is : %d",sum);
    getch();
}[/FONT]
 
sir.. pahelp po about sa c++.

Codes/Program about PRIME AND PRIME FACTORIZATION.

kelangan ko ng program na if PRIME NUMBER ang gi-input ko,
mag-ooutput sya ng "PRIME",

and if COMPOSITE NUMBER naman ang gi-input ko,
e-ooutput nya ung PRIME FACTORS...


output example:

enter a number: 3
<< prime

enter a number: 8
<< 2 2 2 or (2x2x2) or (2.2.2)


Thanks...


www.rel.phatcode.net/junk.php?id=132
primefactorsscreen.png


Java yan but it coul be easily converted to c++.

@crismatel: What's the prob? Mukhang okay naman output mo.
 
Last edited:
Gah! Sorry, double post.
 
Last edited:
guys tanung lang po sa mga vb6 programmers dyan. anu pong best na alternative sa system time? need kasi ng system ko na accurate ang time eh. hmn. ung kahit palitan ang system time is accurate parin yung time nya. any ideas? :thanks: in advance.

i think napakahirap niyan dahil ang timer ng vb6 ay dumedepende sa time sa computer

ewan ko lang ah pero di ko pa nasubukan yan visual palang sa isip ko hehe

i think kailangan connected ka sa internet kung baga kailangan connected

ang system mo sa internet para ma accurate ang time and date niyan at kailangan naka automatic. :noidea:
 
guys tanung lang po sa mga vb6 programmers dyan. anu pong best na alternative sa system time? need kasi ng system ko na accurate ang time eh. hmn. ung kahit palitan ang system time is accurate parin yung time nya. any ideas? :thanks: in advance.

Paps, google mo "query performance counter".
 
Pa Help naman po Sir sa turbo C++ pwede po ba na maghingi ng mga tutorials un Lang po sir salamat .. !!!!!



:pray::pray::pray::pray::pray::pray::pray::pray::pray::pray:



:help::help::help::help::help::help::help::help::help::help:
 
guyz i need help my code ako dito..gusto ko sana magconvert ng hexadecimal to decimal kaso 1 to 9 and A to F lang binabasa nia
here's the code:

Public Class Form6



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x, y, z, f, t As Integer
Dim s, ss, fs, ls, a, c, d As String




s = TextBox1.Text
ss = s
TextBox1.Clear()
If (s = "0" Or s = "1" Or s = "2" Or s = "3" Or s = "4" Or s = "5" Or s = "6" Or s = "7" Or s = "8" Or s = "9") Then
TextBox1.Text = s
Exit Sub
ElseIf (s = "A" Or s = "B" Or s = "C" Or s = "D" Or s = "E" Or s = "F") Then
If s = "A" Then
TextBox1.Text = 10

ElseIf s = "B" Then
TextBox1.Text = 11

ElseIf s = "C" Then
TextBox1.Text = 12

ElseIf s = "D" Then
TextBox1.Text = 13

ElseIf s = "E" Then
TextBox1.Text = 14

ElseIf s = "F" Then
TextBox1.Text = 15
End If
Exit Sub
Else

fs = Mid(s, 1, 1)
ls = Mid(s, 2, 1)



If IsNumeric(fs) = True Then
x = Val(fs)
ElseIf IsNumeric(fs) = False Then
If fs = "A" Then
x = 10
ElseIf fs = "B" Then
x = 11

ElseIf fs = "C" Then
x = 12

ElseIf fs = "D" Then
x = 13

ElseIf fs = "E" Then
x = 14

ElseIf fs = "F" Then
x = 15
End If
End If

If IsNumeric(ls) = True Then
y = Val(ls)
ElseIf IsNumeric(ls) = False Then
If ls = "A" Then
y = 10
ElseIf ls = "B" Then
y = 11


ElseIf ls = "C" Then
y = 12

ElseIf ls = "D" Then
y = 13

ElseIf ls = "E" Then
y = 14

ElseIf ls = "F" Then
y = 15

End If
End If
z = 16 * x + y
For i = 1 To (Len(s) - 2) Step 1
a = Mid(s, i + 1, 2)
c = Mid(a, 1, 1)
d = Mid(a, 2, 1)

If IsNumeric(c) = True Then
f = Val(c)
ElseIf IsNumeric(c) = False Then
If c = "A" Then
f = 10
ElseIf c = "B" Then
f = 11

ElseIf c = "C" Then
f = 12

ElseIf c = "D" Then
f = 13

ElseIf c = "E" Then
f = 14

ElseIf c = "F" Then
f = 15
End If
End If
If IsNumeric(d) = True Then
t = Val(d)


ElseIf IsNumeric(d) = False Then
If d = "A" Then
t = 10
ElseIf d = "B" Then
t = 11

ElseIf d = "C" Then
t = 12

ElseIf d = "D" Then
t = 13

ElseIf d = "E" Then
t = 14

ElseIf d = "F" Then
t = 15

End If

End If
z = z * 16 + t
Next i



End If

End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

End Sub
End Class
 
output:add and subtract numbers in one program

ung add,subtract and multiply mga master ntsambahan ko,pero hiwahiwalay sila ng program..

ngyon kasi magkasama n,wala kong idea kung panu..

nakalimutan ku pa ung gagawin pag open ko ng command prompt kung anu ittype para lumabas ung kulay blue na screen kung san umagawa ng program..
 
PWEDE KO PO BA IPA CODE DITO ANG ASSIGNMENTS KO SA PROGRAMMING NAMIN ? :lol: HAHAHA !
 
output:add and subtract numbers in one program

ung add,subtract and multiply mga master ntsambahan ko,pero hiwahiwalay sila ng program..

ngyon kasi magkasama n,wala kong idea kung panu..

nakalimutan ku pa ung gagawin pag open ko ng command prompt kung anu ittype para lumabas ung kulay blue na screen kung san umagawa ng program..

parang ganto ata ung ginawa namen nung una,
d ku xa maxadong kabisado eh,paki intindi nlng po kung my kulan or mali..ty

import javax.swing.JOptionPane;
public class add
{
public static void main(String args[])
no1,no2,sum
system.Out.println("enter first number'');
JOptionPane.showMessageDialog(null,"no1);
system.Out.println("enter second number'');
JOptionPane.showMessageDialog(null,"no2);
sum=no1+no2
.......

"ganun din po s subtract n ginawa namen,pinalitan lng ng difference at minus sign"

may mali po jan ah,yan lng po ang naalala ko eh,meron p nga kaming ginamit na mga "+" s mga tabi ng mga word,pero d un pinalitan ng "-" nung difference na ang hinahanap nmen,parang kailangan lng talaga ata xa ng mga word na un..
 
balik ako sa programming..para sa mga c++ language user jan, di ko mahanap error ko

okay naman run niya, kaso pag nag play again ako, di na nagpoprompt yung NAME para sa first player

Code:
#include <iostream>
#include <cstring>
using namespace std;

    int score1=0,score2=0;
    void scoreboard();
    void winner();
    void name();
    void game();
    string p1name;
    string p2name;
    char playagain;
    int guess,p1,p2,ans;
    void supermain();
    void again();
    
    
int main()

{    
    
    do {
    supermain();
    again();    
}while(playagain=='y'||playagain=='Y');
    
    system("pause");
    return 0;
}
    void again(){
    loop:
    cout<<"Do you want to play again? (y/n) : ";
    cin>>playagain;
    system("cls");

    if (playagain=='y'||playagain=='Y'){
        system("cls");                                    
    }
    
    else if (playagain=='n'||playagain=='N')
    cout<<"                    Thank you for Playing C++ Guessing Game!!\n\n                              Coded by Xnauwfall\n\n\n";    
    else
    {cout<<"\n\n\nType y or n only!\n\n\n\n";
    system("pause");
    system("cls");
    goto loop;}     
}


    void supermain(){
        
    score1=0,score2=0;   
    cout<<"                    Welcome to this simple C++ Guessing Game!!\n\n                              Coded by Xnauwfall\n\n\n";
    cout<<"Instruction: \nEach of the player will give a secret number\nand the other player must be able to guess the secret number.\n\nPlayer who first get 3 points wins!\n\n\n\n\n\n\n";
    
    system("PAUSE");
    system("cls");
    
    name();
    game();
    winner();
        
}

    
    void name(){
    cout<<"\n\n\nPlayer 1, please enter your name: ";
    getline(cin,p1name);
    system("cls");
    
    cout<<"\n\n\nPlayer 2, please enter your name: ";
    getline(cin,p2name);
    system("cls");
    } 
    
    void winner(){
    scoreboard();
    if(score1==3)
    cout<<p1name<<" won this match!\nCongratulations!\n\n";
    else
    cout<<p2name<<" won this match!\nCongratulations!\n\n";
} 
    
    void scoreboard(){
        cout<<"-=SCOREBOARD=-\n  "<<p1name<<": "<<score1<<"\n  "<<p2name<< ": "<<score2<<"\n\n\n";
        }

    void game(){
    while(score1<3&&score2<3) {
    scoreboard();
    cout<<p1name<<", enter the secret number: ";
    cin>>ans;
    system("cls");

    scoreboard();    
    cout<<p2name<<", guess the number: ";
    cin>>guess;
    system("cls");
    
    if(ans==guess){
    cout<<"You got the correct answer!\n\n\n";
    score2++;                   
    }
    else{
     cout<<"You answered "<<guess<<" which is wrong!\n\n\n";
     }  
    if (score2==3){
    break;
    }
    
    else{    
    scoreboard();
    cout<<p2name<<", enter the secret number: ";
    cin>>ans;
    system("cls");

    scoreboard();    
    cout<<p1name<<", guess the number: ";
    cin>>guess;
    system("cls");     

    if(ans==guess){
    cout<<"You got the correct answer!\n\n\n";
    score1++;                   
    }
    else{
     cout<<"You answered "<<guess<<" which is wrong!\n\n\n";
     }    
}

}
         }
pa guide naman please saan error ko.. :thanks:
 
Mga master patulong naman po mapa run to using c language
bale ganito po magiging output
tapos ganito po pagbabasehan kung pass or failed
0.5 <75
1.0 75-77
1.5 78-80
2.0 81-84
2.5 85-88
3.0 89-92
3.5 93-96
4.0 97-100
failed is 74 below maraming salamat po sa makakatulong
tas ito yung formula sa final grade
a.quizzes-25%
b.project-35%
c.midterm exam-15%
dfinal exam -25%

*** Grading system ***

[1] enter details

[2] exit


tapos halimbawa nag type ng 1 mawawala yung sa taas tas ito magiging output itatype ko mga details

*** 1 - enter details ***
juan dela cruz
201120241
integral calculus

85
90
88
90
100
88
90

formatted out pwedeng ganito

student name: juan dela cruz
student number: 201120241
subject: integral calculus

quiz[1] : 85
quiz[2] : 90
quiz[3] : 88

project[1] : 90
project[2] : 100

midterm exam: 88

final exam: 90

final grade is: 93
equivalent: 3.5 (passed)
 
sir pahelp naman po sa visual c++.system na klngan po na my create,dsplay,edit, print and exit. nahihirapn po ako kz klangan po dalawang username at magkaibang password. PLEASE paHELP po pra my basehan po sna ako pra sa proj ko.thanks in advance po!
 
Last edited:
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;
 
Last edited:
Back
Top Bottom