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
Can a file other than a .h file be included with #include?
What is bss in c?
ATM machine and railway reservation class/object diagram
Explain the use of keyword 'register' with respect to variables.
What does the format %10.2 mean when included in a printf statement?
What is array in c with example?
Difference between pass by reference and pass by value?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
What is the scope of static variable in c?
what is uses of .net
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
Write a function that will take in a phone number and output all possible alphabetical combinations
Explain what is the benefit of using #define to declare a constant?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What is the best way of making my program efficient?