Write a program to print prime nums from 1-20 using c
programing?
Answer Posted / r@m$
#include<stdio.h>
void main(){
int x;
for(x=2;x<=20;x++){
if(x<4)
printf("%d\t",x);
else
if(x%2!=0 && x%3!=0)
printf("%d\t",x);
}
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
Where define directive used?
What is memcpy() function?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What is the purpose of ftell?
Why do we use stdio h and conio h?
p*=(++q)++*--p when p=q=1 while(q<=6)
Can a function argument have default value?
What are two dimensional arrays alternatively called as?
What are different types of pointers?
What is a c token and types of c tokens?
Do pointers store the address of value or the actual value of a variable?
What is a program flowchart?
how do you execute a c program in unix.
What is the ANSI C Standard?