answersLogoWhite

0

ALGORITHM EVEN

BEGIN

FOR ( num = 0; num <= 20; num++ )

BEGIN

IF ( num MOD 2 == 0 ) THEN

DISPLAY (num)

END IF

END FOR

END EVEN

in C:

#include <stdio.h>

int main (void) { puts ("0 2 4 6 8 10 12 14 16 18 20"); return 0; }

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

Write a C program to display odd numbers from 1 to n where n is accepted from user?

#include&lt;stdio.h&gt; main() { int i=0,j=0,n; printf("Enter a number:"); scanf("%d",&amp;n); printf("The first %d odd numbers are:-\n"); for(i=0;i&lt;=n;i++) { if(j%2!=0) printf("%d\n"j); j=j+1; } }


What is the difference between data and programs?

Data is the information that a program will act upon. For example, your data might be all of your financial records for the past year, and the program would be some piece of tax software. The program will act upon your data so that the appropriate numbers are placed in the appropriate fields on your tax return.


What a program of add to number in visul basic net?

In Visual Basic .NET, you can create a simple program to add two numbers by using input boxes or text fields to gather user input. For example, you would declare two variables to store the numbers, convert the input to numeric types, and then perform the addition. Finally, you can display the result using a message box or a label. Here's a basic example: Dim num1 As Integer = Convert.ToInt32(InputBox(&quot;Enter first number:&quot;)) Dim num2 As Integer = Convert.ToInt32(InputBox(&quot;Enter second number:&quot;)) Dim sum As Integer = num1 + num2 MessageBox.Show(&quot;The sum is: &quot; &amp; sum)


Write a C program to find lowest number among ten numbers using for loop?

If you had an array int numbers[10]; you would do it like this: CODE: int lowestnumber = numbers[0]; for(int i = 0; i &lt; 10; i++){ if(numbers[i] &lt; lowestnumber) lowestnumber = numbers[i]; } END CODE I think this should work, and in the end the variable lowestnumber will hold the lowest value in the ten. Hope this helps.


How would you write a program that read an integer for display each of digit of integer in English?

Use an enum if you are using a c style language. Or a map data structure. Assign each integer an English value and then match it to what the user inputs.

Related Questions

A is an application program that allows you to search for and display webpages?

what is an application program that allows you to search for and display web pages?Examples would be, Internet Explorer, FireFox, Opera, Crome and many more.


What would the display for the numbers 31-40 look like?

71


Write a C program to display odd numbers from 1 to n where n is accepted from user?

#include&lt;stdio.h&gt; main() { int i=0,j=0,n; printf("Enter a number:"); scanf("%d",&amp;n); printf("The first %d odd numbers are:-\n"); for(i=0;i&lt;=n;i++) { if(j%2!=0) printf("%d\n"j); j=j+1; } }


CAN a word processor program read encrypted data?

No, if it is coded it would display only set of meaningless characters.


How many times would a digital clock display the same numbers in a 24-hour day?

i think its 17


Does a calculator display the exact values of all irrational numbers?

No. An irrational number is one that does not repeat or finish, and a calculator cannot display millions of digits like an irrational number would have.


Write a C program to find the sum of all prime numbers?

Since there is an infinite set of prime numbers the answer would be infinity.


What numbers are between 12.0 and 29.0?

There are an infinity of numbers between 12.0 and 29.0 so it would be impossible to list them.


How many numbers between 44 and 81?

Between them, not including them it is 36. If you include these two numbers, it would be 38.


What is the difference between the commands you would have to execute to write a character to the display if you did not have BIOS?

wat


How can I transfer big files between computers?

You would need a program like DropBox. You would need to have a network connection between the two computers you want to use. Another program would be YouSendIt.


What is the sum of all the numbers from 1 to 240?

Any spreadsheet program would tell you... 28,920