#include<stdio.h>
void main()
{
int a[10],n,i,large,small;
printf("enter the value of n\n");
scanf("%d",&n);
printf("enter the elements\n");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
large=a[0];
small=a[0];
for(i=1;i<n;i++)
{
if(a[i]>large)
large=a[i];
if(a[i]<small);
small=a[i];}
printf("largest element in the array id %d\n",large);
printf("smallest element in the array is %d\n",small);
}
Use the following algorithm (written in pseudocode). Let largest be the lowest possible real number. Let smallest be the greatest possible real number. Repeat while there is input... { Read real number r from input. If r is greater than largest then let largest be r. If r is less than smallest then let smallest be r. } End repeat. Let range be largest minus smallest. Output range.
k
smallest: zero largest: five thousand
Name two variables x and y. Divide the largest by smallest. If remainder is zero then the smallest is the HCF.
write a c program to fine largest/smallest of 3no (using ?:ternary operator/conditional operator)
final double[] ns = new double[10]; final Random rnd = new Random(System.currentTimeMillis()); // Fill... for (int i = 0; i < ns.length; ++i) { ns[i] = rnd.nextDouble(); } // Get largest/smallest... double largest = Double.MIN_VALUE; double smallest = Double.MAX_VALUE; for (double n : ns) { if (n > largest) { largest = n; } if (n < smallest) { smallest = n; } } // largest and smallest are now the proper values.
The smallest 5 digit number you can write is 10000.
Write your own prime number program and find out.
just go the reverse of how they are listed now they are currently largest to smallest
what is if(!(str[i]==32))
I believe the answer is: 7,7,11
Asia and Australia are continents.