I have runtime error, but I don't know why? Somebody can tell me what's wrong with this code? :
#include<iostream>
using namespace std;
int fibon(int a);
int potega(int b);
int main()
{
int n, m;
while(cin>>n>>m)
{ cout<<fibon(n)%potega(m)<<"\n ...
Search found 4 matches
- Wed May 16, 2007 6:13 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10229 - Modular Fibonacci
- Replies: 53
- Views: 26257
- Fri Feb 23, 2007 9:58 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10189 - Minesweeper
- Replies: 418
- Views: 125039
- Wed Feb 14, 2007 7:51 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10189 - Minesweeper
- Replies: 418
- Views: 125039
10189
what is wrong with this code? I have WA.. I don't undersand why...?
#include<iostream>
using namespace std;
char check(char t)
{
int i=0;
if(t!=42) i=1;
return i;
}
main()
{
int a, b, it=1;
while(cin>>a>>b)
{
if((a==0) && (b==0)) break;
char **t;
t= new char*[a+5];
for(int i=0; i ...
#include<iostream>
using namespace std;
char check(char t)
{
int i=0;
if(t!=42) i=1;
return i;
}
main()
{
int a, b, it=1;
while(cin>>a>>b)
{
if((a==0) && (b==0)) break;
char **t;
t= new char*[a+5];
for(int i=0; i ...
- Thu Feb 01, 2007 11:08 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 318536
100
I don't understand this check system.. Yesterday I submit this code and answer was WA but tuday I send this same code and was AC?? is it strange??
#include <iostream>
using namespace std;
int main(void){
long i,j,m,temp,total,max;
while(cin>>i>>j){
cout<<i<<" "<<j<<" ";
max=0;
if(i>j ...
#include <iostream>
using namespace std;
int main(void){
long i,j,m,temp,total,max;
while(cin>>i>>j){
cout<<i<<" "<<j<<" ";
max=0;
if(i>j ...