oh ok i get that part im going to limit my array to 31 numbers so i put array[32]
int main(){
int array[32],i,max=2147483648;
do
{
printf...
Type: Posts; User: dals2002
oh ok i get that part im going to limit my array to 31 numbers so i put array[32]
int main(){
int array[32],i,max=2147483648;
do
{
printf...
ok so here is the problem : "Using an array, write a program to convert a decimal number (from 0 to 31) to binary number
here is my program so far
"libraries are included"
int main(){
...
yea that gives me the remainder of the division, it gets higher the higher the numbers, but it doesn't give me what i want which is the opposite of the remainder. i was asked in the book to use a for...
oh modulus % find the value of the remainder of the equation or division
i still haven't solved this problem, somehow always all the easy stuff throws me off
anyways, if anyone can help me with this it'll be great
thanks
the modulus equation in that part give me
g=150/62=2.419 but the modulus sign rounds it off to the next lowest whole number
ohhhh i see the modulus thing in the for statement inside the...
ok im doing this other program on for loops for greatest common divisor, so the problem is i cant seem to display the common divisor of both numbers, so i seem to be having problems with the formula...
thanks this is very helpful :D
well all that is left for me to say its thanks to all that contributed and helped :D ;)
like is there any other way to like re write it so that instead of putchar('$') i can use like printf or something else?
wow i can't believe i missed that, i really missed it by a long shot
here is the finished program
int main()
{
int i,j;
i kind of got it now just need to break it up which i been trying to put j-- to see if it does remove the one but i guess it doesn't, also i have another question is there anyway to write...
the second loop is exactly what i don't get how can i change the values to printout $ signs, i get the part where i set the system to do it
for(i=1;i<=1;i++){
for(j=1;j<=5;j++){...
what i mean to print out is
$$$$$
$$$$
$$$
$$
but if i do it that way it all prints it out in a straight line down which is not really what im looking for
so i have run into another wall, there is this problem where it tells me to print dollard signs
Using 2 For loops printout
$$$$$
$$$$
$$$
$$
thanks guys i finally got it, it took some time and understanding but atleast i got it, this is my final program for those that want to look at it
#include <math.h>
#include <stdio.h>...
why wouldn't i run it in 1 and 0? the fibonacci rule says that when the fibo number is 1 then its equal to 1, and as stated in the problem the number 0 must be 1 too
so i have a question should i implement a if statement, just so that the first two numbers are left alone, and then put the equation in for the loop as the else statement?
ok so im suppose to use fibonicci number
"The sequence of integers 1,1,2,3,5,8,13....has been name the fibonacci sequence in honor of mathematician. the first two fibonacci numbers (0 and 1st) are...
oh nice thanks guys it worked took me a while but i got it thanks
ok i have inputed all that u guys wrote, but now as soon as i input the Y it closes up, so why doesn't it let me pass the Y, is it not accepting the char Y?
#include <math.h>
#include...
ok so im making a purchase receipt kinda of program but everytime i try it it never works
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
ohhh there we go i got it thanks, this one closes at the end, thanks alot guys made my day
thanks, now i only have one last question i want the program to end after i hit a key and not repeat itself
ok so im very new to programming in c and i have this program called "Open Watcom", or "Miracle C" that i use for my c
anyways to the point, when it comes to running the program, it runs it for...