answersLogoWhite

0


Best Answer

#include<iostream.h>

#include<conio.h>

main()

{

int i,j;

i=0;

j=0;

for(i=1;i<=5;i++)

{

if(i>j){

cout<"the value of i is="<<i;

}

else

{

cout<<"the value of j is="<<j;

}

}

getch();

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program with a loop that lets the user enter a series of integers the user should enter -99 to signal the end of the series after the program should display the largest and smallest.?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

C program to find the largest and smallest character in a word?

helicopter


Write a program that randomly fills a 10 component array then prints the largest and smallest values in the array?

final double[] ns = new double[10]; final Random rnd = new Random(System.currentTimeMillis()); // Fill... for (int i = 0; i &lt; 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 &gt; largest) { largest = n; } if (n &lt; smallest) { smallest = n; } } // largest and smallest are now the proper values.


How do you write program to read a set of real numbers and find the range is given by the difference between largest and smallest number?

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.


An assembly language program that will take three decimal input and display minimum of them?

program that take three decimal number as input and find the largest among them in assembly language


Write a program that will find the smallest largest and average values in a collection of N numbers Get the value of N before scanning each value in the collection of N numbers?

#include #include #include int main(int argc, char *argv[]){int n, smallest, largest, sum, temp;if(argc < 2){printf("Syntax: foo val1[val2 [val3 [...]]]\n");exit(1);}smallest = largest = sum = atoi(argv[1]);for(n = 2; n < argc; n++){temp = atoi(argv[n]);if(temp < smallest) smallest = temp;if(temp > largest) largest = temp;sum += temp;}printf("Smallest: %i\nLargest: %i\nAverage: %i\n", smallest, largest, sum / (argc - 1));return 0;}

Related questions

C program to find the largest and smallest character in a word?

helicopter


Write a program that randomly fills a 10 component array then prints the largest and smallest values in the array?

final double[] ns = new double[10]; final Random rnd = new Random(System.currentTimeMillis()); // Fill... for (int i = 0; i &lt; 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 &gt; largest) { largest = n; } if (n &lt; smallest) { smallest = n; } } // largest and smallest are now the proper values.


How to write a C program for left factoring?

Name two variables x and y. Divide the largest by smallest. If remainder is zero then the smallest is the HCF.


How do you write program to read a set of real numbers and find the range is given by the difference between largest and smallest number?

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.


An assembly language program that will take three decimal input and display minimum of them?

program that take three decimal number as input and find the largest among them in assembly language


How can you download c compiler?

write a c program to fine largest/smallest of 3no (using ?:ternary operator/conditional operator)


Write a program that will find the smallest largest and average values in a collection of N numbers Get the value of N before scanning each value in the collection of N numbers?

#include #include #include int main(int argc, char *argv[]){int n, smallest, largest, sum, temp;if(argc < 2){printf("Syntax: foo val1[val2 [val3 [...]]]\n");exit(1);}smallest = largest = sum = atoi(argv[1]);for(n = 2; n < argc; n++){temp = atoi(argv[n]);if(temp < smallest) smallest = temp;if(temp > largest) largest = temp;sum += temp;}printf("Smallest: %i\nLargest: %i\nAverage: %i\n", smallest, largest, sum / (argc - 1));return 0;}


How do you start the display program in Linux from the command line?

the command "display" brings up the ImageMagick program.


What is a token in the context of a C program?

smallest individual units of a program


How do you get a Java program to display a backslash in output without it interpreting it as a program command?

Follow the backslash with another backslash: System.out.println("\\ " \"); will display \ " \ on the screen.


Writes a c program to find the sum of all integers between 1 and n?

Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11


Program that interprets and display webpages?

browser