- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Coding passion...
- Interests
- Coding, Guitaring, Maths and problems solving...
- PC Specs
- (Compiler: Pelles C, Free Pascal, Visual Studio)(CPU: AMD Athlon 64 3200+, Ram: 2 Gb, HDD: 80 Gb, VGA:…
11 Posted Topics
Hi every one, I had implemented Karatsuba algorithm in C++, but I have been stuck for 2 days. First problem is the function give incorrect answer, second problem is it oftens crash when run (runtime error). I try to debug but cannot understand how it's not work. I hope someone … | |
I'm writing a simple program to figure out how Linked List works, but for now I'm stucking. I don't know which line cause the error or I had a mistake in thinking. I run my program by my hand and it works fine. But when run, it gets error at … | |
Re: My few successful program: #include<iostream.h> #include<conio.h> void main() { short int n,i,j,k,max; int m[50]; i=0; j=0; k=0; max=-32767; cout<<"Value of length: "; cin>>n; for(i;i<n;i++) { cout<<"Value "<<(i+1)<<": "; cin>>m[i]; if(m[i]>0&&m[i]%2==0) k++; if(m[i]<0&&m[i]>max) { max=m[i]; j++; } } cout<<endl<<"Number of natural even value: "<<k<<endl; if(j>0) { cout<<"Position of max negative value … | |
Re: I think you shouldn't use "fscanf" for get a string which maybe contain space character. because 'fscanf' will stop if it hit space character. Use fgets instead. `fgets(search,sizeof(search),querryfile);` `fgets(word,sizeof(word),datafile);` Another note that a name of a string works like a constant pointer to char, so when pass to "scanf", or … | |
*I wrote these problems last night (except 19th problem), and code them at the morning, so, hope you all enjoy coding. This is ordiginal post of these 20 problems. Any question about the clarity of problems please post on below or contact me via pm, and your solutions too.* *If … | |
**Problems 1: Spiral matrix - Advanced** Source of the problem: [Here (not in English)](http://www.spoj.com/PTIT/problems/BCACM11B/) Spiral matrix is formed by filling number 1 in 1st row 1st column, after that, filling with increasing number by clockwise, example: 1 2 3 4 5 16 17 18 19 6 15 24 25 20 … | |
Re: I have an integer variations a, if: a/10 then what is the result? | |
These programs are not perfect and very coarcenes but I think it understandable for who are new to learning Graph Theory. I will point directly each problem by using example code. Any questions or idea please post here. Thank you. Here are my programs, we will start with a basic … | |
Hi everyone, I guest I'm very young in here, now I'm just 17 years old. My passion for coding is very large, I've learnt basic Pascal at school and now I learn C++ myself. I'm a newbie in Pascal and C++. I'm join to our community with hope that my … | |
My program doesn't have compile-error but it sometime struck in 201 runtime-error. I don't know why, please someone help me. Here is my program: program TestNumber; uses crt; const fi='D:\program\text\ipTestNumber.txt'; fo='D:\program\text\opTestNumber.txt'; type proint=record len:word; //length of proint. val:array[1..256] of byte; //value of proint. sign:boolean; //is smaller than zero? end; dummy=string; … | |
Here is my few successful program: #include<iostream.h> #include<conio.h> //============================================================================== void main() { short int n,i,j,k,max; int m[50]; i=0; j=0; k=0; max=-32767; cout<<"Value of length: "; cin>>n; for(i;i<n;i++) { cout<<"Value "<<(i+1)<<": "; cin>>m[i]; if(m[i]>0&&m[i]%2==0) k++; if(m[i]<0&&m[i]>max) { max=m[i]; j++; } } cout<<endl<<"Number of natural even value: "<<k<<endl; if(j>0) { cout<<"Position of … |
The End.