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
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
Explain the ternary tree?
Write a program of advanced Fibonacci series.
Do pointers store the address of value or the actual value of a variable?
Explain what is wrong with this statement? Myname = ?robin?;
Do pointers need to be initialized?
What is c value paradox explain?
explain how do you use macro?
What is pointer & why it is used?
Explain what is wrong with this program statement?
Array is an lvalue or not?
What is the use of #define preprocessor in c?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
Why do we need functions in c?
What is strcmp in c?