You really need some nested loops; but some programming languages might allow you to write this as one statement.
a factor
program to find prime number in 8085 microprocessor
That statement is false. For example, (-2) - (-3) = 1 which is a positive number created from two negative numbers when subtracted.
That's close to five million numbers. I'm not printing out five million numbers. There are plenty of online resources where that information can be found.
Between the two numbers there are 49.
Good luck with that one, I don't think it's possible as it would have to count the positive integer factors which exist between 1 and the value of half of each number, if the count becomes greater than two then continue to the next number (i.e it isn't a prime number). It is maybe possible in a single compound statement but I don't think that is what you are after.
VBnet program to find the prime numbers between 100 to 200?
12
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.
No. The statement is wrong. It does not hold water.
All of the whole numbers between one and a billion. Honestly, we're not robots here. Write a program and do it yourself, if you really need them.
Statement numbers were a feature of BASIC, and while QBASIC supports them, they are by no means necessary.
It is very easy. The program begins here..... /*Program to sum and print numbers without creating variables*/ #include<stdio.h> main() { clrscr(); printf("%d+%d=%d",5,2,5+2); getch(); } /*Program ends here*/ Now just by changing the numbers in the "printf" statement we can add, subtract, multiply and divide the numbers without using variables. Hence the problem is solved..........
That's a true statement. Another true statement is: All integers are rational numbers.
a factor
main() { int i, n, sum=0; cout<<"Enter the limit"; cin>>n; for(i=0;i<=n;i++) sum=sum+i; cout<<"sum of "<<n<<" natural numbers ="<<sum; getch(); }
Rational numbers represent a tiny part of real numbers.