thanks
shouldnt I put a cin >> firstNum ; somewhere?
Like here maybe?
void input(){
cout << "\n\t\t\tEnter First Number: ";
cin >> firstNum ;
firstNum = get_double();
Type: Posts; User: Fizz
thanks
shouldnt I put a cin >> firstNum ; somewhere?
Like here maybe?
void input(){
cout << "\n\t\t\tEnter First Number: ";
cin >> firstNum ;
firstNum = get_double();
thanks for the reply :)
a bit complicated too me; a few unfamiliar words.
interesting though.
hello all,
Im having some problems doing this simple program.
#include <iostream>
using namespace std;
void input();
float result,firstNum, secondNum;
Oh, I get it... I can only use strcmp with strings, right?
It works now, thanks. :)
When I run it, it returns two errors and I dont understand the debug.
Could you be a bit more specific? thanks :)
I dont understand why the 2 errors.
#include <iostream>
#include <string>
using namespace std;
char choice;
void M();
void C();
I m trying to do an end of chapter exercise.
I’m quite new to programming.
First time coding with a class; in fact, not even sure if should be using a class here at all.
Brace yourself it’s a...
Hi Hunter2,
>> getch(); //You may want this to be outside the loop.
>> return 0; //This definitely should be outside the loop.
Oops! sorry, I overlooked that.
>> You don't really need...
I'm doing an exercise from a book [First Course in C++].
This is what I got so far:
#include <iostream.h>
#include <conio.h>
int main()
{
Oh yes. :-)
Sorry I missed that (its 5am here. I better go to sleep)
Thanks a lot the reply
Goodnight/morning
swoopy:
jeez! thanks for that.
Thats a bit better... but still not returning "Fibonacci" numbers (?)
>> thats "Fibonacci" and your output looks good.
It looks good , but it doesnt return the value.
I run the program and I get rubbish.
Hello guys,
I’m doing a beginner course in C++.
I was given as an exercise to display “Binocchi” (spelled right?) numbers using arrays.
(1, 1+1=2, 1+2=3, 2+3=5, 5+3=8, 5+8=13, etc.)
(hence:...
Do you get 'st' on your compiler?
Im using VisualC++... and it doesnt want to know
#include <iostream.h>
class date {
public:
char WeekDay[3];
int DayOfMonth;
int MonthOfYear;
int Year;
};
Nah... It still returns "th".
>>So... 17 % 10 == 1 = what?
>17 % 10 is 7, so the suffix would be "th".
Right.
But it supposed to return "st"
Whoops. Youre right... the switch does the job.
I changed the value of *TodaysDate.DayOfMonth * to 1 or 2 or 3 but it still gives me *th*.
How do I get it to print st or nd or rd.
Thanks
Yes... but what I dont understand is how.
*TodaysDate.DayOfMonth* is 17. Right?
So... 17 % 10 == 1 = :confused: what?
Also the switch statements dont do anything.
strange.
Hello all,
I’m a newby practicing C++. I’ve copy this code from a book am reading.
I’m not sure what the *if else* statements and the *switch* statements are used here for.
I also don’t...
Of course!! Silly me!
I cannot belive it.
Thank a lot for the reply :D
Hello all,
Im a beginner and I need a hint.
// Counter controlled loop
// Multiplication table
#include <iostream.h>
#include <conio.h>
void main()
{