but the thing just doesnt work at all...
would anyone kindly check this for me??
Thanks a lot!
Expand|Select|Wrap|Line Numbers
- #include "stdafx.h"
- #include <iostream>
- #include <cmath>
- using namespace std;
- //To determine whether a given number is prime or not
- void main()
- {
- int N;int count;
- cin >> N;
- int k;
- for (k=2;k<N;k+1)
- if (N%k==0)
- {cout << k;
- cout << N/k;
- cout << count;}
- if (count==0)
- cout << " <<N<<"is a prime number."
- }
my teacher told me to include this,but i dont know if it is a default function or not.