User Profile
Collapse
-
What's revhat()? could you please elaborate more?... -
Loop to print reverse of any size number
The problem is input a number then the output should be in reverse order..
I already made a code but only good for 9 - digit only...What I want to do is to hold infinite digit, in other words don't have a limit on how many digit that I want to input..
for (x = y;x>0;x=x/10){
z = x % 10;
cout<<z;
}
*... -
Help on Select Case
Please give me some hints on how to finish my program..the problem is i have to make a program wherein i will type the start time and the end time, get the length of time..using the 24 -hour clock. using only Select case, no if/else
here's my unfinished code:
Console.Write(" Enter start time: ")
st = console.ReadLin e()
Console.write(" Enter end time: ")
et = console.ReadLin e()... -
Help in Char data type
please help, just typed a sample code below. My problem is that if I enter capital letter "A" the program is terminated. In other words, only the small cap "a" is read...So if I enter or type letter a, the program works but for capital letter its not working..What's wrong with this?
Dim x as char
......
Select case no
Case "a" Or "A"
console.writeli ne("Statement" )... -
HELP on char data type
My code:
char name1, name2;
int votes1, votes2;
float total votes;
cout<<"Enter name of candidate: ";
cin>>name1;
cout<<"Enter number of votes: ";
cin>>votes1;
cout<<"Enter name of candidate: ";
cin>>name2;
cout<<"Enter number of votes:... -
help on char data type
my code:
char name;
float price, no_of_pieces;
cout<<"Enter your name: ";
cin>>name;
cout<<"Enter price: ";
cin>>price;
cout<<"Enter no of pieces: ";
cin>>no_of_piec es;
output:
Enter your name: John
Enter price:
Enter no of pieces:
Question:
Why is it... -
Problems: Operators
Hello, just want to ask on how I'm going to start my program. Pls Guide me. What I want to is enter a 9 digit number then the output will be like this --->
Enter no: 123456789
Telephone no: (02) 890 - 6397 -
thank you very much for the reply ganon, would like to ask another question...in every arrays, are you going to include the #include <string.h>?...Leave a comment:
-
char name[5];
name [0] = 'A';
name [1] = 'E';
name [2] = 'I';
name [3] = 'O';
name [4] = 'U';
name [5] = 0;
hello ganon, this is what you mean?...Leave a comment:
-
-
-
What kind of problem? C lang
*=A
$=E
output:
Encrypted Message: M$$T M$ *T 1PM
Decrypted Message: Meet me at 1PM
Is this problem concerns with Arrays or strings? -
Help in Adding (C++)
There's something wrong with my program..This is my desired output:Code:cout<<"Enter a number: "; cin>>x; for(y=1;y<=x;y++){ cout<<"No."<<y<<": "; cin>>no; sum=no+sum; }
Enter no: 3
No 1: 2
No. 2: 3
No. 3: 4
Sum = 9
Please help. Thanx... -
-
where am i going to put the spaces? before the second for loop or after the two loop? am i going to use "\t"?...Leave a comment:
-
just a follow up question...does C++ have a gotoxy(col, row) like in Turbo C? if not what does C++ have in lieu of the col, row in turbo c..thanx for the reply...Leave a comment:
-
Loop Problem--help
I want to make an output like a Christmas Tree
but...my code shows only half of it...
*
**
***
****
*****
What's wrong with my loop?
for(x=1;x<=5;++ x){
for(y=0;y<x;++y ){
cout<<"*";
}
cout<<"\n";
} -
hello banfa,
what do you mean by stack?
But on the other hand what's the difference between this two code?
int sum=0, x;
for(x=1;x<=5;x+ +){
sum+=x;
}
printf("%d",sum );
compare to this-->
int functi(int y)
{
int b;
b=y+b;
return b;
}
or did I forgot to initialize b...Leave a comment:
-
question: what's the difference between return(0) and return value?Leave a comment:
-
int funct(int x)
{
int a;
a=x*x;
return a;
}
int functi(int y)
{
int b;
b=y+b;
return b;
}
so i'll write the code like this...
int funct(int x)
{
int a, b=0;
a=x*x;
b=b+a;
return b;
}
is that what you mean? sorry for the question...i just want to understand the program...thanx...Leave a comment:
No activity results to display
Show More
Leave a comment: