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
what is the syallabus of computer science students in group- 1?
What is the use of header files?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
What is atoi and atof in c?
Why main is not a keyword in c?
What is the difference between pure virtual function and virtual function?
what type of questions arrive in interview over c programming?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
How important is structure in life?
the question is that what you have been doing all these periods (one year gap)
Differentiate between declaring a variable and defining a variable?
What is the use of printf() and scanf() functions?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
What is s in c?
Write a program to reverse a string.