smart to use frets(); thank you, It is finished. I appreciate your help. This is my basic calculator. later on I'll work on making one that will just ask you for input like: 2+4+1+(2/3)*(1+2)+3 and...
Type: Posts; User: mmario10
smart to use frets(); thank you, It is finished. I appreciate your help. This is my basic calculator. later on I'll work on making one that will just ask you for input like: 2+4+1+(2/3)*(1+2)+3 and...
I tried it, awesome no errors now, perfect! There is just a little bug I'm trying to fix. I changed main a bit. Instead of putting system("clear"); in the end of the function I put it in the start of...
oh, I see , thank you once more (:
I still have a problem though. two actually. This one is solved but the other problem is that when you choose option 5 or 6 it will ask you for a value of pi. Now the end result is correct but...
yeah you are indeed right. It's because before there were only add, subtract and exit. Although the effect is the same! I added more and forgot :p Thankx (:
that looks simpler, thank you. How about I make a void function lets call it clsret() the has both those command in it and then I just call it every time I need a return for my function.
I'm on a mac (: the library works fine for macs just need to change cls to clear. I did that so that when it returns to main it clears the screen. thanks about the 500-digit (: what do you suggest...
Thank you, I had no idea actually I thought it was the same as float. It works now. Everything except the area and perimeter of circle. I can't seem to find any error in the code. And by the way, is...
what have you written so far? do you know what type of loop you're gonna do? First think how you would do that with the same character, then think how it is going to change. Show us the code you have...
oh my god how stupid.... Thank you. I've corrected and used %f but now when I input, say 5 + 1 the result is: 0.0000 + 0.0000 = 0.0000
I have now put the code. I initialized them. As they are doubles I initializes as: double n1 = 0.0;
Sorry here it is!
this is a calculator which adds, subtracts, divides, multiplies, calculates areas and perimeters of a circle. although all appears fine to me, whenever i choose to add subtract or whatever, this is...
I made the source code for the ping part although it has many errors as it looks more like pseudo-C than actual C, I'm a rookie,
include <stdio.h>
include <windows.h>
pingScan();
FILE...
Greetings! I was creating a small software that ping sweeps all the hosts in the lan and port scans the alive hosts. then they would put the alive ip addresses in a file called alive.txt followed by...
Oh! Okay I'll try. And what I was trying to do with the = sign is see if it was a true value rather than false but I wasn't sure if that could possibly be done.
Thanks, now about the if statement I guess I can's just put:
if (system(str) = 1)
{
pingstat = fopen("pingstat.txt", "a+");
fprintf(pingstat,"%d", i);...
I code in pascal, java and basic. I guess what I wrote is more pseudo C than C. Is there anything I can do to make the system function take the formatted style the printf does?
Hey! I am writing a piece of software which for now tests if a host within the local network is alive and saves the ip address to the text file. Then it reads and displays the hosts that are alive....
Fixed the error, thanks. And changed the 'l' variable to 'r'. Intead of doing:
int b = r + b;
I did:
b = r + b;
I'm having an error, when it reaches the answer, it always gives me 0!!! I attatched the image of the error, as well as the C file where it resides.
#include <stdio.h>
int main ()
{...
I solved that error, but when i reach the answer, it still gives me 0!!
Oh thank you, I discovered my error. I should have put:
for(i=0; i < a; i++)
{
printf("Your Number(s): ");
scanf("%d", &l);
int b = l + b;
}
I'm having an error as you can see in the image I attatched. I also attached the only c file of this program in which the error resides.