write a program to print the all 4digits numbers & whose
squares must me even numbers?
Answer Posted / ruchi
#include<stdio.h>
#include<conio.h>
int main()
{
int i,p;
printf("\nNumbers are ");
for(i=1000;i<=9999;i++)
{
p=(i*i);
if(p%2==0)
{
printf("%d\n",i);
}
}
getch();
}
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
What is meant by type specifiers?
Explain what is wrong in this statement?
What is the difference between array and pointer?
What is function in c with example?
Is a house a mass structure?
Can a local variable be volatile in c?
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
What does *p++ do?
If I have a char * variable pointing to the name of a function ..
What is extern c used for?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
How can you read a directory in a C program?
What is line in c preprocessor?