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!

Programming 101 [Problems & Solutions]

Pa-help po ulit sana ko regarding C++ Prob.. :pray:

Attach ko nalang po .txt file kasi di ko po ma-align ng maayos yung text..


naku! matagal nako 'di gumagamit ng C++. yung mga magagaling sa C++ diyan tulungan niyo naman si karead...:help:
yung borland C++ ba yung gamit diba?

Code:
Create a C++ Program that will produce the output as shown:



Enter Highest Score: 50
Enter Class Interval: 3
Enter No. of Classes: 6

Press any key to continue...



      Class Scores
Scores		Frequency
48 - 50		2
45 - 47		5
42 - 44		6
39 - 41		10
36 - 38		3
33 - 35		1

Press any key to continue...



	     Statistical Analysis
scores		CM	Frequency	CMF
48 - 50		49	    2		_?_
45 - 47		46	    5		_?_
42 - 44		43	    6		_?_
39 - 41		40	    10		_?_
36 - 38		37	    3		_?_
33 - 35		34	    1		_?_

Total CMF = _?_	   Total Freq = _?_	Mean = _?_

Press any key to Quit?




FORMULA:

CMF = Frequency * CM

CM = (low + high)/2
Mean = Total CMF/Total Frequency

low [20]
high [20]
freq [20]
CM [20]
 
Last edited:
naku! matagal nako 'di gumagamit ng C++. yung mga magagaling sa C++ diyan tulungan niyo naman si karead...:help:
yung borland C++ ba yung gamit diba?

Code:
Create a C++ Program that will produce the output as shown:



Enter Highest Score: 50
Enter Class Interval: 3
Enter No. of Classes: 6

Press any key to continue...



      Class Scores
Scores		Frequency
48 - 50		2
45 - 47		5
42 - 44		6
39 - 41		10
36 - 38		3
33 - 35		1

Press any key to continue...



	     Statistical Analysis
scores		CM	Frequency	CMF
48 - 50		49	    2		[U]_?_[/U]
45 - 47		46	    5		[U]_?_[/U]
42 - 44		43	    6		[U]_?_[/U]
39 - 41		40	    10		[U]_?_[/U]
36 - 38		37	    3		[U]_?_[/U]
33 - 35		34	    1		[U]_?_[/U]

Total CMF = [U]_?_[/U]	   Total Freq = [U]_?_[/U]	Mean = [U]_?_[/U]

Press any key to Quit?




FORMULA:

CMF = Frequency * CM

CM = (low + high)/2
Mean = Total CMF/Total Frequency

low [20]
high [20]
freq [20]
CM [20]

Thanks po sa pag-post nung main file.. :salute:
Kaso la pa rin reply regarding the problem.. :weep:
 
mga tol patulong nman!!eto nnman ako tambak ng assignments eh...

eto po mga prob ko..

1. accept 10 integer and
a. find the sum of all positive numbers
b. find the difference of all negative numbers
c. if there are zero's in the inputs accept another input to replace the zero's

2. write a program that will accept 10 numbers and display the
a. mean
b. mode
c. median

3. eto ung ginagawa ko ngaun:
using array, accept 25 numbers and display the highest and lowest inputs.
kung magagawa nyo tong 3rd problem malaking tulong po tlga.

tnx!!!:)
 
For sure OT to! pero sana matulungan nyo akO! need ko po ng C++ and C# application can somebody give me any link to DL this apps... . and step by step installation para po dito kasi may ilang application din na kailangan diba. salamat ng maramI!
 
mga tol patulong nman!!eto nnman ako tambak ng assignments eh...

eto po mga prob ko..

1. accept 10 integer and
a. find the sum of all positive numbers
b. find the difference of all negative numbers
c. if there are zero's in the inputs accept another input to replace the zero's

2. write a program that will accept 10 numbers and display the
a. mean
b. mode
c. median

3. eto ung ginagawa ko ngaun:
using array, accept 25 numbers and display the highest and lowest inputs.
kung magagawa nyo tong 3rd problem malaking tulong po tlga.

tnx!!!:)

i think this works for prob # 3.. try this bro

#include <iostream.h>
#include <conio.h>
main ()
{
int x[25];
int y;
int z;
int h_num;
int l_num;
for (y=0; y<25; y++)
{
cout << "Enter Digit #" << y + 1 << ": ";
cin >> x[y];
}
l_num = x[0];
h_num = x[0];
for (z=1; z<25; z++)
{
if (l_num > x[z])
{
l_num = x[z];
}
if (h_num < x[z])
{
h_num = x[z];
}
}
cout << "the lowest number is: " << l_num << endl;
cout << "the highest number is: " << h_num;
getch();
}


pwede din ang solution na to


#include <iostream.h>
#include <conio.h>
main ()
{
int x[25];
int y;
int z;
int h_num;
int l_num;
for (y=0; y<25; y++)
{
cout << "Enter Digit #" << y + 1 << ": ";
cin >> x[y];
if(y == 0)
{
l_num =x[y];
h_num =x[y];
}
if (l_num > x[y])
{
l_num = x[y];
}
if (h_num < x[y])
{
h_num = x[y];
}
}
cout << "the lowest number is: " << l_num << endl;
cout << "the highest number is: " << h_num;
getch();
}


pili ka lang
 
Last edited:
Borland c++ compiler ba hinahanap mo? Search ako dito sa Symbianize wala eh. Matagal narin ako nagrerequest niyan wala talaga. Bibili nalang ako ng cd sa mall.
 
eto po case study namin,,sa java po siya gagawin,,
bali menu type po siya,,may tatlong games:basketball,flames at color game,,
pipili po ang user kung anung game ang gusto niya,parang ganito:

Main Menu
Please choose a game:
1. Basketball
2. Flames
3. Color Game
4. Exit.

yan ganyan,pag pumili ang user ng isang game,papasok na dun sa game na yun,,sa bawat laro na pipiliin tatanungin ng program ang username ng naglalaro,,
anu ba gagawin sa bawat game??

ganito..

for basketball, may 2 teams,12 players per team,,
tatanungin muna ng program ang pangalan ng 1st team,,tapos,ipapa-input na ng program yung 12 players ng 1st team,then yung 2nd team naman,ganun din,team name,,tapos yung 12 players,,pag katapos nun,,tatanungin na ng program kung anung team ang may hawak ng bola,,1st team ba or 2nd team,,then,, next question ay kung sinong player ang may hawak ng bola,,then next question is nakaghoot ba?? yes or no ang pedng sagot,,pag yes ang sagot,,tatanungin ng program kung wat points,,1,2 at 3 ang points na pagpipilian,,pag no naman ang sagot, tatanungin ulit kung sino ang player na may hawak ng bola,,bawat points na nashoshoot ng player ay marerecord sa kaya,,then 2nd team naman ang may hawak ng bola,tapos ganun pa rin ang mga itatanong,,bali parang alternate lang,,pag 1st team ang unang may hawak ng bola,,pag nakashoot,,yung kabilang team naman ang titira,,

panu tatapusin ang laro????
itatanung ng program kung gusto pa maglaro ng user,,

kailan itatanong???
itatanong siya bago tumira yung kabilang team,,
pag yes ang sagot ng user,,tuloy ang laro,,titira na ang kabilang team,,pero pag no,,
ilalabas ng program ang results ng game...parang ganito...

MVP: eto yung player na may pinakamaraming points
Team Winner: team na nanalo
Team Winner Points: total score ng nanalong team,,

Team 1:
Player 1-12:ilalagay din ang points ng bawat player
Team 2
Player 1-12:ilalagay din ang points ng bawat player


Team 1 Bench Players:mga players na hindi napili,,
Team 2 Bench Players: mga players na hindi napili,,

pag napakita na tong mga results na ito,,babalik sa main menu.


for flames:
bali syempre pag pinili ito,,tatanungin muna ng program ang name ng naglalaro,,
then ipapainput ang male name,,
then ang female name,,

tapos iooutput ang results,,
F-Friends
L-Lovers
A-admiration
M-marriage
E-Enemy
S-sweetheart,,

mas maganda sana kung maipapakita din yung pagkakansel nung mga letters na natanngal,,para mas makatotohanan,,

pagkatapos idisplay ang results,,tatanungin ang user kung gusto pa maglaro,,pag gusto pa,,
iapapainput ulit ang male name,,female name,,and so on,,,

pag ayaw na babalik ulit sa main menu...

for color game:
eto yung parang sa mga perya,,

una syempre papainput ulit ang name ng maglalaro,,
bali may nakaset na na pera na hawak ang player [eg. 20 php],,in short di makakapili ang maglalaro kung magkanu ang pera na gusto niya,,,

tapos nun papipiliin ng program kung anung kulay ang gusto ng player tayaan,,bali may anim na color,,tatlong dice,,,

bali isang kulay lang ang pedng piliin ng user,,di pede dalawa or tatlo na kagaya sa totoong perya,,

tapos nun tatanungin siya ng program kung magkanu ang bet niya,,,
pag lagpas ang bet dun sa pera na hawak ng player,,ilalabas ang error dialog box na nagsasabing kulang ang pera,,pag hindi naman kulang,,proceed,,

bali magkakaron ng random choosing ang program kung anu ung tatlong kulay na ilalabas,,
pag halimbawa pula ang napili ng user at 2 php ang taya niya,,at lumabas ay dalawang pula,,
bali mananalo siya ng 4 php,,pag tatlo ang lumabas,,syempre 6 php,,pag alang lumabas na pula,,edi mababawasan siya ng 2 php,,,

panu tatapusin ang laro??
sa bawat labas ng mga kulay,,
itatanung ng program kung gusto pa magpatuloy ng user sa paglalaro,,pag oo,,tuloy lang sa procedure,,pipili ng kulay,,tapos tataya,,,pag ayaw niya na,,lalabas na sa main menu,,


grabe ang haba,,
sino kaya ang Master Programmer na makakagawa nito,,

sana matulungan niyo ako,,
pag may tanung kayo just pm me,,,
salamat
 
Guys may tanong ako sa vb6. Eto..

Sa form1 mag-iinput ka nang string characters sa textbox. Paano siya mapiprint non sa textbox or picturebox sa form2?

Eto ginagawa ko ayaw niya
private sub cmdcompute_click()
Dim inputname as string
inputname = (txtinputname.Text)
picoutputname.Print inputname

*bali yung picoutputname na picturebox nasa form2.
 
One way to do it is to put the value of inputname to a global variable para pwede mo parin sya ma retrieve even nasa kabilang form kna
 
Ganito po

dapat yung

picoutputname.print

eh ganito

form2.picoutputname.print
 
AED may tanong ulit ako. Sa combobox naman 'to. 'diba sa combobox may mga list yan.
Halimbawa sa list ng combobox may
Private Employee
Goverment Employee


pag click mo sa Private Employee, mapiprint yung 20,000.00 sa picturebox. Pag sa Government Employee 30,000.00 naman mapiprint sa picbox.
Paano po yon? Parang may case or ifelse statement diba

*
Category - Maximum of load
Private Employee - 20,000.00
Government Employee - 30,000.00
 
Last edited:
AED may tanong ulit ako. Sa combobox naman 'to. 'diba sa combobox may mga list yan.
Halimbawa sa list ng combobox may
Private Employee
Goverment Employee

pag click mo sa Private Employee, mapiprint yung 20,000.00 sa picturebox. Pag sa Government Employee 30,000.00 naman mapiprint sa picbox.
Paano po yon? Parang may case or ifelse statement diba

*
Category - Maximum of load
Private Employee - 20,000.00
Government Employee - 30,000.00


private sub combo1_onclick()
or onchange()
if combo1.text = "government employee" then
picturebox.print "30.000"
end if

if combo1.text = "private employee" then
picturebox.print "20.000"
end if

end sub

parang ganyan ata yun wala kasi ako sa bahay kaya di ko sure kung magwowork yan icorrect mo nalang yung mga mali...
 
Back
Top Bottom