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
Why is sizeof () an operator and not a function?
Can an array be an Ivalue?
What is the difference between the local variable and global variable in c?
Explain output of printf("Hello World"-'A'+'B'); ?
Are negative numbers true in c?
How are Structure passing and returning implemented by the complier?
What is c token?
Is array a primitive data type in c?
What is %g in c?
using only #include
Is fortran still used today?
plz let me know how to become a telecom protocol tester. thank you.
What is c mainly used for?
Can two or more operators such as and be combined in a single line of program code?
Why do we need a structure?