Thanks for the responses, makes sense now. This code was for an embedded platform of which I do not know any details, so it's very hardware specific. I will be porting it to a different...
Type: Posts; User: nafix
Thanks for the responses, makes sense now. This code was for an embedded platform of which I do not know any details, so it's very hardware specific. I will be porting it to a different...
Hello. I'm working on a project where I have to use someone's code. I know what this block of code does, I need help with the actual syntax. I'm confused on why the uint32_t is in parenthesis and how...
What would be a good technique to store and keep information about all the cells? The plan is in the main function, I'm going to switch off between the player function and computer function. As it...
I need help in the player move function. How would I go about storing a 'x' or 'o' in an array and keep it there? As it is, I'm using the integer i as the user input and I don't know how I can take...
[QUOTE=foxman;684487]
#include<stdio.h>
#include<string.h>
int palin(char array[20])
{
char *n;
n = array[0];
/* I don't know what u mean with (char *) = (char). How exactly would i code...
Does anyone know why my pointer isn't working for this program?
So here is my new code:
#include<stdio.h>
#include<string.h>
int palin(char array[20])
{
char *n;
n = array[0];
The program is supposed to test whether or not a word is a palindrome through using recursion. I'm getting a lot of errors when i try and compile this program. Can anyone help me out with this? It...
Thanks for the response. I'm still a bit confused though. I can't have any print statements in my main function. Let's say I make another function that prints "Enter x: " and scans in x. How do I...
I'm having a problem with a program I'm trying to code. The program needs to calculate the the value of e^x by using its formula which is e^x= summation x^n/ n!
So I have all the code worked out:
...
How can I compute the value of x^n without using any library functions? Also can anyone tell me how to calculate factorials such as n!?
This is what I came up with for x^n but it gives me tons of...
Can someone please help me with this assignment:
1. In cryptography, one of the simplest ciphers is known as a mono-alphabetic shift cipher. In this cipher, each time a letter appears in the...
I fixed those and now when I compile I get like 20 errors. Am I defining things wrong?
Can someone help me with what I'm doing wrong. I'm getting "parse error before else" on the 19, 25, and 31 line.
Here is the assignment:Write a C program that takes as input three integers and then...
Oh, I had put in &a again for the second scanf instead of &b. Now it works. Thanks for the help guys.
i tried a= 2 and b= 3. i've tried multiple conditions where b is bigger or c is equal, but i always get "The Greater Number is 1"
This is an assignment i'm working on:
Write a C program that indicates which of the two given numbers is greater. The program
should receive two float numbers as input from the user. If the first...
[QUOTE=nafix;669560][QUOTE=nafix;669551]This is my program thus far:
#include <stdio.h>
int main(void)
{int a, b, c, thousands, hundreds, tens, ones;
b=1000;
printf("Enter a number(integer):...
do i put that in a print function? how would i go about initializing modulo in code?
Is there a way to print out the remainder of integer/ 1000? So if i divide 12225 by 1000 to get 12.225, can I print out the 2 for hundreds, 2 for tens, and 5 for ones? Or can I print out the...
but the program has to work for integers over 9,999. subtracting out 1000 wouldn't work for things over that number, right?
[QUOTE=nafix;669551]This is my program thus far:
#include <stdio.h>
int main(void)
{int a, b, thousands, hundreds, tens, ones;
b=1000;
printf("Enter a number(integer): ");
scanf("%d", &a);...
This is my program thus far:
{int a, b, thousands, hundreds, tens, ones;
b=1000;
printf("Enter a number: ");
scanf("%f", &a);
thousands= a/b;
printf("%d", thousands);
So I want to divide the...
Can someone please help me with this assignment? I'm a programming noob and any help would be greatly appreciated. Write a program that receives an integer from user and prints out the number of...