how i m write c program 1.check prime number 2.prime number
series
Answer / sulthan
#include<stdio.h>
void main()
{
int a,i,n=0;
printf("\nEnter the Number");
scanf("%d",&a);
for(i=1;i<=a;i++)
if(a%i==0)
n++;
if(n=2)
printf("Prime")
else
printf("NOT Prime");
}
Is This Answer Correct ? | 5 Yes | 2 No |
How arrays can be passed to a user defined function
write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.
give an example of type casting by a simple c program
write a c program to find the probability of random numbers between 1-1000
struct node { int *a; char *b; char array[12]; }; struct node m,*n; assign the value in *a,*b,char array[12]
Explain what is the difference between null and nul?
Derive the complexity expression for AVL tree?
What is size of union in c?
Why c language is called c?
How do you list a file’s date and time?
write the program to find multiplication of 2-D matrix??????????
What are the __date__ and __time__ preprocessor commands?