hi there,
actually you can use either ways, but find codes that it may feel you comfortable to use, if i were writing your program data stuctures are more convinient like struct.
regards,...
User Profile
Collapse
-
in some ways your command of placing your break statement is correct but, your if statement is lacking of idea how the break statement will terminate it,
you can try:
if ( count <=0)
{
break;
}
then this will work, but in your idea of using " if (count)" , it shows that the compiler doesn't know how will he herminate your command....Leave a comment:
-
hi there,
perhaps you should post something first, your question should have to be at base 11 but how do we solve that, whats the real story of this base 11, post something, ok
regards,...Leave a comment:
-
hi there,
skills can be improve by time, effort, resourcefulness and self steem, i suggest you to read, search and solve some problems in c, and then analyze how that problems work out, read some problems from reliable websites, and study again, ask question on some forums like this on things you don't understand...ok
goodluck!!!!!!!
regards on your contest......Leave a comment:
-
hi there,
it seems that we are very willing to help you, but for now i strongly suggest that you post something, coz some people here are too busy to encode codes from the scratch, so post something and we'll see..
ok
regards,...Leave a comment:
-
hi there,
hope this might be of help!!!!
#include <iostream>
using namespace std;
long factorial (long a)
{
if (a > 1)
return (a * factorial (a-1));
else
return (1);
}
int main ()
{
long number;
cout << "Please type a number: ";
cin >> number;...Leave a comment:
-
hi there,
actually you can code that using case statement, but i also prefer using if else ,co'z for me that would become more easy to read, but you can try that, what does you have so far....
regards,...Leave a comment:
-
hi there,
there are so many methods to do that but unfortunately we don't see any code fron you that people can anlyze what you are trying to say.. so pls post something ,i believe that would help you and would help us too...
regards,...Leave a comment:
-
hi there,
i think your program needs to get the greatestcommon denominator of two numbers right, your program seems that it would not run even you arrange this code
y:= x-y and x:=y-x
you should change that ok...
but anyways try this one i think this would help you:
#include<stdio. h>
int main()
{
int a,b,n,GCDnum=0, num;
printf("enter...Leave a comment:
-
hi there,
i think your error is in within your switch file , co'z you'd always closing it , look at this line:
switch(num)
{
case 1:
sum = 0;
Hotel = 1;
for (Months = 0; Months < MONTHS; Months++)
{
sum = sum + totalguests[Hotel][Months];
}
cout<<"Yearly Total: "<<sum<<end l;
}
return 0;
}
...Leave a comment:
-
hi i just want the meaning of n [ i ]and the relation of letter i to n on this
scanf("%d",&n[i]);
and the letter j to n on this,
if (n[j] >=90)
thanks,...Leave a comment:
-
hi there,
i ca'nt code for you right now so i'd advice you to see some websites, with programs sample??
ok,
regards,...Leave a comment:
-
hi there,
An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
where each blank panel represents an element of the array, that in this case are integer values of type int. These elements are numbered from 0 to 4 since in arrays the first index is always 0, independently of its length.
Like a regular variable,...Leave a comment:
-
hi there,
can you post your program, so people ca analze your problem??
regards,...Leave a comment:
-
hi there,
Like a regular variable, an array must be declared before it is used. A typical declaration for an array in C++ is:
type name [elements];// int mike [5];
where type is a valid type (like int, float...), name is a valid identifier and the elements field (which is always enclosed in square brackets []), specifies how many of these elements the array has to contain. that means you can declare...Leave a comment:
-
hi there,
i think you should post your questions on the HTML forum.....
regards,...Leave a comment:
-
the scope of variables declared within a function or any other inner block is only their own function or their own block and cannot be used outside of them.
#include <iostream.h>
int integer -----------
char aCharacter; // this ------------- first four are global variables
char string [20]; -------------
unsigned int YourNumber; ...Leave a comment:
-
hi there,
in your header put " #include <string.h>, and you do'nt have any declaration in your sum function, coz in your
code: sum = sum + score [i]; // how will you get the input "sum" i suggest to create some formula for it.
regards,...Leave a comment:
-
hi there,
as you know there are lots of programming language that we people can use, but as an advise, i think you'd better stick on one language first before going or change to other language, C++ is a more challenging language than other language, if you can prove that you may become good C++ coder i think it will become more easy for you to study other language like what you've said..
goodluck!!!!!!!
...Leave a comment:
-
hi there,
your statement "strcpy(variabl e[0].name,"name");" was declared outside to the beginning of the definition of the main function. The main function is the point by where all C++ programs start their execution, independently of its location within the source code. It does not matter whether you declare other functions with other names defined before of after it - the instructions contained within this function's...Leave a comment:
No activity results to display
Show More
Leave a comment: