Did it on my own yeah haha thanks everyone for the help
Type: Posts; User: Bubbles293
Did it on my own yeah haha thanks everyone for the help
Ok it works now the only bit i need help with now is the distinct positve factors part any ideas?
It wont happen
Ok the program i posted works the only thing is that when the number is prime it does not say the number is prime so that print must be in the wrong place so is it a problum with my brackets?
#include<stdio.h>
#include<math.h>
int main(void){
int n,i,a;
printf("enter the number");
scanf("%d",&n);
for(i=2;i<n;i++)
{
...
#include<stdio.h>
#include<math.h>
int main(void){
int n,i,a;
printf("enter the number");
scanf("%d",&n);
for(i=2;i<n;i++)
{
a=n%i;
if(a==0)
should it be a while loop
for(i=2;i<=n;i++)
is it to do with this line
Crap do u no what is wrong wit the code?
Hi i ran the code again and it does the is it prime or is it not why do you think it does not do what i think it does i am confused
#include<stdio.h>
#include<math.h>
int main(void)
{
int n, i, a;
printf("enter the number");
scanf("%d", &n);
for (i = 2; i <=n; i++)
{
In C i am using dev C++ so far i have read in the matrx A
#include<stdio.h>
#define DIM 4
int main(void){
double A[DIM][DIM];
int i, j;
/*read in the matrix*/
for(i=0; i<DIM; i++){
Hi can anyone help i have to write a program in c that reads in a 4x4 matrix A checks if all the entries are positive and if each row is less than one then get the program to print out the value of...