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)

per day nag titimes 2 ung amount . mag uumpisa sa 0.01. haanggang 64 day
day amount
1 0.01
2 0.02
3 0.04
4 0.08

Code:
#include <iostream>
#include <math.h>

using namespace std;

int main (void)
{
	int ctr;
	double result;

	for (ctr = 0; ctr <= 64; ctr++)
	{
		result = pow(2, ctr) / 100;

		cout << result << endl;
	}

	return 0;
}
 
Last edited:
pa help.
ung _ = space un. ayaw kasi ung space.
enter a number: 4
****
_***
__**
___*
 
Last edited:
pa help.
ung _ = space un. ayaw kasi ung space.
enter a number: 4
****
_***
__**
___*
 
Last edited:
help po. kasi gumagawa kami program ,, idedescribe nya..kung mataas o mababa ung number dun sa fix number.. ang problem ko is pag maginput na ko ng number na pang second time nateterminate na sya .. gumamit ako ng getch. pero gang isa lang ea. panu pu ba maging unlimited ang pag input? turbo c pu pala gamit ko..:help:

Code:
do
	{
		printf("Input a number, use 100 to exit:");

		number = getch();
		
		if (number == sentinel)
		{
			printf("Remarks: %d is equal to %d. Exiting code.", number, sentinel);
		}
		else if (number > sentinel)
		{
			printf("Remarks: %d is greater than %d.", number, sentinel);
		}
		else
		{
			printf("Remarks: %d is lesser than %d.", number, sentinel);
		}
	}
	while (number != sentinel);

try mo yang snippet na sir. Yong algo is parang ganyan. I can't compile using getch() walang conio sa ubuntu e. I need to look pa for alternative.
 
Last edited:
Assignment

1. Write a program that would actually count the number of odd and even numbers. Consider
that there’s only ten (10) numbers to be sort out. Write one using while loop structure and one
without any loop structure.

2. Write a program that would actually sum up the number of odd and even numbers. Consider
that there’s only ten (10) numbers to be sort out. Write one using while loop structure and one
without any loop structure.

pa help naman po sa assignment thanks in advance.. :noidea:
 
mga boss pa help naman poh sa proj. ko na delete poh un .ccp na iwan un app eh nalimutan ko na poh un ibah code nito.
cats-6.jpg
pa post nalang poh ng code :thanks:
 
mga boss pa help naman poh sa proj. ko na delete poh un .ccp na iwan un app eh nalimutan ko na poh un ibah code nito.
cats-6.jpg
pa post nalang poh ng code :thanks:
:lol: Haha niloloko mo kami ah. Kung ikaw talaga gumawa nyan e di alam mo kung ano codes nyan. Kasi ako ung program na pinasa ko nung 1st year ako alam ko parin ung codes pati ung name ng mga variable na ginamit ko.
 
heloo help muna man po ako about sa pg output ng alphabet with their corresponding ascii... asap! thanks:
pray:
 
:lol: Haha niloloko mo kami ah. Kung ikaw talaga gumawa nyan e di alam mo kung ano codes nyan. Kasi ako ung program na pinasa ko nung 1st year ako alam ko parin ung codes pati ung name ng mga variable na ginamit ko.

group project namin yan eh nawala na yun code. :slap:
 
pa tulong nmn boss yhash, panu ang logic ni2?
ang input ko sa textbox ay 1 2 3
ang solution nmn 1+2+3
tpos ang output nya ay 6
dapat po sa isang text box lng ilalaga ung 3 numbers,,p help po plssss:D
 
Last edited:
hi this is my answer to your question:

#include<iostream.h>
#include<conio.h>

main(void)
{
clrscr();
int num1, num2, num3, sum1;
char top;

top:

cout<<"ENter first number: \t\t";cin>>num1;
cout<<"Enter second number:\t"<<"+\t";cin>>num2;
cout<<"Enter third number: \t\t";cin>>num3;
cout<<"\t\t\t\t-----\n";

cout<<"The sum of the 3 numbers:";cout<<num1+num2+num3<<endl<<endl;
cout<<"Do you want to count press y/n? ";cin>>top;
if(top=='y')
goto top;
getch();
return 0;
}



try it..
 
pa tulong nmn boss yhash, panu ang logic ni2?
ang input ko sa textbox ay 1 2 3
ang solution nmn 1+2+3
tpos ang output nya ay 6
dapat po sa isang text box lng ilalaga ung 3 numbers,,p help po plssss:D

#include<iostream.h>
#include<conio.h>

main(void)
{
clrscr();
int num1, num2, num3, sum1;
char top;

top:

cout<<"ENter first number: \t\t";cin>>num1;
cout<<"Enter second number:\t"<<"+\t";cin>>num2;
cout<<"Enter third number: \t\t";cin>>num3;
cout<<"\t\t\t\t-----\n";

cout<<"The sum of the 3 numbers: ";cout<<num1+num2+num3<<endl<<endl;
cout<<"Do you want to count press y/n? ";cin>>top;
if(top=='y')
goto top;
getch();
return 0;
}
 
Boss patulong sa parallel ports kung pano mapapgana 12 wires kasi 8 lang nagagawa nmin eh.
 
Uhm p help naman sa java namin convert binary to hexa... may nakuha ako kay pareng google ito yung sample code

import java.io.*;
import java.lang.*;

public class BinaryToHexa{
public static void main(String[] args)throws IOException{
BufferedReader bf= new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the Binary number:");
String hex = bf.readLine();
long num = Long.parseLong(hex);
long rem;
while(num > 0){
rem = num % 10;
num = num / 10;
if(rem != 0 && rem != 1){
System.out.println("This is not a binary number.");
System.out.println("Please try once again.");
System.exit(0);
}
}
int i= Integer.parseInt(hex,2);
String hexString = Integer.toHexString(i);
System.out.println("Hexa decimal: " + hexString);
}
}



Kaso ang gagamitin namin is yung length nung string yung kukunin tapos yung ininput mong number idi divide sa 4 gamit yung modulo kasi yun d b sa binary to hexa is yung may 8421 method syempre dapat 1 and 0 lang parang ganto 10101010101110101 ivalid naman kapag may ibang number maliban sa 1 or 0



hindi ko lang ma gets sa code jan eh yung ito... System.out.println("Enter the Binary number:");
String hex = bf.readLine();
long num = Long.parseLong(hex);
long rem;
while(num > 0){
rem = num % 10;
num = num / 10;
palagyan po ng comment sa program para mapag aralan ko ng mabuti at hindi copy paste lang para din sakin yun di ba? salamat:p;)
 
pa tulong nmn boss yhash, panu ang logic ni2?
ang input ko sa textbox ay 1 2 3
ang solution nmn 1+2+3
tpos ang output nya ay 6
dapat po sa isang text box lng ilalaga ung 3 numbers,,p help po plssss:D
Code:
int sum = 0;
Scanner sc = new Scanner(textField1.getText());

while (sc.hasNextInt()) {
	sum += sc.nextInt();
}
 
Back
Top Bottom