I am new to c programming and need help. I have finally made program for prime numbers(with the help of internet) which works accurately. I only do not understand 1 thing. Here's my program
...
Type: Posts; User: arslan20
I am new to c programming and need help. I have finally made program for prime numbers(with the help of internet) which works accurately. I only do not understand 1 thing. Here's my program
...
O. K friends, I have finally made program for prime numbers which works accurately (with the help of internet). I only do not understand 1 thing. Here's my program
#include<stdio.h>...
But this program reports "1159" as prime and in fact it's not a prime number...
I want that my program should check from 2 to 9. It should divide entered number from 2 to 9 turn by turn and in any case if the remainder is zero the program must declare that number is not...
I want that my program should check from 2 to 9. It should divide entered number from 2 to 9 turn by turn and in any case if the remainder is zero the program must declare that number is not prime....
but this program yields correct result for prime numbers greater than 10 and wrong for each number
Here is my rough program
#include<stdio.h>
#include<conio.h>
int main(void)
{
int a,b,c,d,e,f,g,h,i;
printf("Enter a number");
scanf("%d",&a);
b=a%2;
I am new in c programming. I want to make a program in which when I enter a number the program should tell me whether it is prime or not. I have found various programs on internet but they are all...
Thanks grumpy: you explained it right way. You should be a teacher because of your method of explaining. well done!!:biggrin:
Thank you Salem: It worked great for me. 110% helpful and true answer. But you know I am beginner in C language so i don't understand the reason. Although you mentioned it but my level is low. It...
Hi everybody. I made this code for quadratic formula but it's not working as it should. I am learning "C language" so it's very simple code.
Important: It is working efficiently for "real and...