Write a program to print prime nums from 1-20 using c
programing?
Answer Posted / sreejesh1987
//Ha Ha I'm the creator of shortest code
//for prime numbers
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
printf("\t\t\tPRIME NUMBERS 1-20\n");
printf("\n\t2");
for(i=3;i<=20;i++)
for(j=2;j<i,i%j!=0;j++)
if(i-1==j)
printf("\n\t%d",i);
getch();
}
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What is the difference between declaring a variable by constant keyword and #define ing that variable?
What is the general form of #line preprocessor?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
which is an algorithm for sorting in a growing Lexicographic order
What is the significance of scope resolution operator?
What are the types of data structures in c?
c language interview questions & answer
What is use of bit field?
What is a memory leak? How to avoid it?
What does 4d mean in c?
What is use of null pointer in c?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
How to get string length of given string in c?
What type of function is main ()?