answersLogoWhite

0

You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.

User Avatar

Wiki User

11y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

Write a basic program to print even and odd numbers in between 1 to 10?

# include&lt;stdio.h&gt; void main() { int i = 1; while(i&lt;11) { if(i%2==1) { printf("\n%d",i); } i++; } }


How do you write a program in java to read ten numbers and print sum of ten integers?

Add the numbers into one variable as you read them in. But if you prefer, you can read the numbers into an array and then use a loop to add the numbers together.


Write a program to print first 100 alternative prime numbers?

This would require some computer knowledge. It can make it easier to find out the prime numbers without figuring it out in your head.


Program for print prime all number from 1 to 100 in foxpro?

Oh, what a lovely request! In FoxPro, you can create a program to print all prime numbers from 1 to 100 by using a loop to check each number for divisibility only by 1 and itself. If it meets this criteria, you can print it out on the screen. Remember, every number is unique and special, just like a happy little tree in a vast forest.


Write a program to input two numbers and print their number and square?

Here's a simple Python program that takes two numbers as input and prints each number alongside its square: # Input two numbers num1 = float(input(&quot;Enter the first number: &quot;)) num2 = float(input(&quot;Enter the second number: &quot;)) # Print each number and its square print(f&quot;Number: {num1}, Square: {num1**2}&quot;) print(f&quot;Number: {num2}, Square: {num2**2}&quot;) This program uses the input function to read numbers, converts them to floats, and then calculates and displays their squares.

Related Questions

Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


Write a c program to print the 100 to 1 nos?

Write a c program to print the 100 to 1 nos


Write a C Program to print sum of squares of odd numbers?

#include


Write a program to print even and odd numbers in between 1 to 10?

for (int i = 2; i < 10; i ++) printf("%d\n", i); You did say even and odd numbers between 1 and 10. That's allnumbers between 1 and 10.


How do you write a Qbasic program to display these Numbers-0112358132134?

you do this 10 print "0112358132134" use the whole of the thing


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


How do you write a program to print numbers from star one and next line star two in php?

Try the triangle program on a search engine. Replace numbers with stars and that should do the trick


Write a unix program to print print a pattern?

echo 'print a pattern'


Write the program in qbasic and add two numbers?

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end


Write a program to print odd numbers In C plus plus between 51 to 100?

#include &lt;iostream&gt; int main() { for(int i=51; i &lt;= 100; i+=2) { cout &lt;&lt; i &lt;&lt; endl; } return 0; }


Write a program to print odd numbers In vbnet between 51 to 100?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int i,j; for(i=51;i&lt;100;i=i+2) { printf("%d", i); } getch(); }


Write a basic program to print even and odd numbers in between 1 to 10?

# include&lt;stdio.h&gt; void main() { int i = 1; while(i&lt;11) { if(i%2==1) { printf("\n%d",i); } i++; } }