Search found 1 match

by rebecca6212
Sat Sep 18, 2010 5:11 pm
Forum: Volume 9 (900-999)
Topic: 913 - Joana and the Odd Numbers
Replies: 32
Views: 17451

Re: 913 - Joana and the Odd Numbers

can anybody tell me what's wrong with the code?
thank you :)

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
int n,x,y;
int N[63];
int m;
while(1){
printf("n:");
scanf("%d",&n);
while(n%2==1){
x=n/2;
m=(1+(2*x)-1)*x+1;
N[0]=m;
//printf ...

Go to advanced search