biggest of two no's with out using if condition statement
Answer Posted / partheeban
void main()
{
float i,j;
int a;
printf("Enter two numbers : ");
scanf("%f%f",&i&j);
a=i/j;
if(a)
printf("%f is greater",i);
else
printf("%f is greater",j);
}
| Is This Answer Correct ? | 2 Yes | 9 No |
Post New Answer View All Answers
Why pointers are used?
What does the format %10.2 mean when included in a printf statement?
Write a program that accept anumber in words
What is the general form of a C program?
What are different storage class specifiers in c?
regarding pointers concept
Which is better between malloc and calloc?
What is extern c used for?
What is the best way to comment out a section of code that contains comments?
What is function prototype?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
How many keywords (reserve words) are in c?
What is wrong with this code?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?