http://cplusplus.com/ref/cstdio/printf.html
precision:
Type: Posts; User: Barnzey
http://cplusplus.com/ref/cstdio/printf.html
precision:
Nice one :P
Hi all got a puzzle for you!
Find the next two lines of the following sequence:
11
21
12-11
11-12-21
31-22-11
13-11-22-21
Well,
char ADD; isnt actually making a string a containing the word ADD, it simply creates a variable called ADD.
Also A[3] is the 4th element in A, i.e if A was "hello", A[3] would be l (the...
Why dont you just show us what you've got and ask us for help??
http://computer.howstuffworks.com/c.htm
Worked fine for me...
Is this your site?
http://www.angelfire.com/linux/willc0de4food/programs/basicinput.c
Just incase anyone didnt know, mine isnt red text its a link
Google for "What are factorials used for"
Well if its any help
it simplifies to:
cos(kL/2) = k/b
half angle formulae?
my bad, forgot that was a C++ source code. I've got a C version but its not on the PC, would mean typing it up. If i get time ill post it.
Do you mean having somthing like:
a = 5
b = 6
a+b =...
// GENERIC PARSER
#include <iostream>
#include <cstdlib>
#include <cctype>
#include <cstring>
using namespace std;
enum types { DELIMITER = 1, VARIABLE, NUMBER};
scanf("%s %s", variables);
but then you need to know how many words there are going to be.
use
gets, or fgets
Or you can use strncpy,
strncpy(name,filename,(strlen(filename)-4));
Or
strtok:
So want every part of the array to be sumed with all the other parts, if not can you say it again, i didnt really understand.
I dont know if you can use:
_getch() and _putch();
But look into them.
If you want to learn object oriented C i found a pdf:
http://www.planetpdf.com/codecuts/pdfs/ooc.pdf
I can tell you how to check if 2 lines are perpendicular:
If line 1 is a, and line 2 is b then to check you need to know the eqn:
a.b =|a||b|cos(theta)
where theta is the angle between them,...
That level of C isnt hard, he has simply added error checking by checking to see wether or not an input has been received. And the:
((input % 2) == 0) ? "" : "not ")
Is basicaly an if...
Sorry for interupting this nice little argument, but did you fix your program?
Hey thanks alot :)
I already changed the NUMBER bit, it was the return's that were wrong.
thanks again for your help!
l == "b" ??
Would help if we could see the whole code.
Can you not try using a for(;;) loop, then start with a getkey function, then have a switch statement...
stdin is from the command line.