How would you divide huge numbers that are stored in arrays and have between 1 and 100 digits, i already implemented some basic arithmetic operations like +,-,* ?
Type: Posts; User: Dusko
How would you divide huge numbers that are stored in arrays and have between 1 and 100 digits, i already implemented some basic arithmetic operations like +,-,* ?
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main () {
time_t b,e;
e=time(NULL); // current time
b=e;
printf("\nTimer: ");
...
Thanks. What I have to change in this code to make it working properly?After printing 10 it prints 90.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
main () {
time_t b,e;
...
Is it possible to clear last input on display without clearing hall display using system("cls") or fflush(stdout)?I want to make timer so i need to delete last input to show new time...
OK that was helpful, thank you!
The thing is that i'm going to have exam in C and on exam we write code on paper without any help of computer, so it's much more difficult and i'm still not sure why this program doesn't work
...
This is confusing.The main thing that i'm not sure will something stay in buffer after scanf. For example second scanf in this doesnt work
#include <stdio.h>
#include <stdlib.h>
main () {
...
Aren't 2 scanf functions suppose to be separate, so that first function read sth from the buffer after pressing enter and after that second func. should be called?
Is it true that if sth stays in...
OK but why in this example it skips second scanf
#include <stdio.h>
#include <stdlib.h>
main () {
int i;
scanf("%d",&i);
scanf("(%d",&i);
This doesnt works it only prints 1, probably because '\n' stays in buffer and after when fscanf is called again it returns 0. You said that it's not problem if scanf is followed by another scanf but...
Thank you on your reply it was helpful, I accomplished same thing with fscanf(fp, "(%d)", &i); fgetc(fp); but it prints 10(which is the last number) two times and i'm not sure why. Second thing...
Nope,it doesn't work but i also need some explanation.
I have a problem when trying to read this kind of format (someNumber) from file or standard input, so there is some problem with this conversion string "(%d)" in scanf and fscanf.How to solve that...