To find greatest of 3 digits in one line
#includ<stdio.h> #include<conio.h>
void main() { int a,b,c; printf("enter a,b,c:); scanf("d%d%d",&a,&b,&c);
printf("greatest no: %d"(a>b)?((a>c)?a:c):((c>b)?c:b));
printf("have a nice day");
getch();
}
#include<stdio.h>
int main(){
int a,b,c;
int big;
printf("Enter any there numbers: ");
scanf("%d%d%d",&a,&b,&c);
if(a>b && a>c)
big = a;
else if(b>c)
big = b;
else
big = c;
printf("Largest number is: %d",big);
return 0;
}
Sample output:
Enter any there numbers: 13 25 6
Largest number is: 25
The greatest number is infinity.
Compare the first two numbers with the ternary operator. Store the result in a temporary variable. Compare the temporary variable with the third number, again using the ternary operator.
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
#include<stdio.h> void main() { int a=10,b=15; clrscr(); if(a>b) printf("%d is the large number",a); else printf("%d is the large number",b); getch(); }
The sizeof() operator returns the number of bytes allocated to the operand.
The greatest number is infinity.
Compare the first two numbers with the ternary operator. Store the result in a temporary variable. Compare the temporary variable with the third number, again using the ternary operator.
Adjoint operator of a complex number?
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
If a number is nonzero, then the number is positive.
#include<stdio.h> void main() { int a=10,b=15; clrscr(); if(a>b) printf("%d is the large number",a); else printf("%d is the large number",b); getch(); }
The main number for reaching a telephone operator in the UK is 100.
The number of a operator will be 0 or 411.
There is no such thing as 'the greatest number'. Here is a program in unix to prove it: echo 'for (i=1; i>=0; i= i*2) print i,"\n";' | bc if you want to actually see the output use it this way: echo 'for (i=1; i>=0; i= i*2) print i,"\n";' | bc | less -S
The statement is bi-conditional. The "if and only if" should have tipped you off immediately.
Given that an integer is the same as a whole number, there are four true conditional statements.
If the number is one, then it is the smallest positive square.