answersLogoWhite

0

All the smallest factors of a number must be its smallest factor, which for any number is 1, so:

loop

loop

loop

print "Enter an integer number: ":

input n

until num(n) do

print "Please enter a number"

repeat

until n = int(n) do

print "Please enter an integer"

repeat

print "Smallest factor of ":n:" is 1"

repeat

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Basic Math

Write a qbasic program to display A NEW LINE?

In QBasic, you can display a new line using the PRINT statement. To create a new line, you can simply use an empty PRINT statement. Here’s a simple example: PRINT "This is the first line." PRINT ' This will create a new line. PRINT "This is the third line." This program will display the first line, then move to a new line, followed by the third line.


Create a program that will ask the user to input an integer and display all odd numbers?

HERE IS IT!!!!!#include#includevoid main(){int a[12],b[12],c[12],i,j=0,k=0;clrscr();printf("Enter an integer\n");for(i=0;i


Write a program to find Armstrong number in visual basic 10?

An Armstrong number (or narcissistic number) for a given number of digits is a number that is equal to the sum of its own digits raised to the power of the number of digits. Here’s a simple Visual Basic 10 program that checks for Armstrong numbers: Module ArmstrongNumber Sub Main() Dim num As Integer Dim sum As Integer = 0 Console.Write("Enter a number: ") num = Convert.ToInt32(Console.ReadLine()) Dim temp As Integer = num Dim digits As Integer = num.ToString().Length While temp > 0 Dim digit As Integer = temp Mod 10 sum += Math.Pow(digit, digits) temp \= 10 End While If sum = num Then Console.WriteLine(num & " is an Armstrong number.") Else Console.WriteLine(num & " is not an Armstrong number.") End If End Sub End Module This program takes a number as input, calculates the sum of its digits raised to the power of the number of digits, and checks if the sum equals the original number.


How do you prepare a program in basic to display the word and the number of letters in it when is given as input?

10 cls 20 input"enter word";word$ 30 print word$ 40 print len(word$) 50 end this program is for GW BASIC for other BASIC's the line numbers are optional.


How i will write a program in qbasic -to display your name multiple times using do whileloop?

QBASIC code/Editor Screen (Press key [F5] to make the program RUN/execute...) ==== (Pressing any key returns you straight back to the Editor screen; where you can either chose to further Edit/Re-Run/or else, Save your program.) Here is another example. CLS COLOR 15, 4, 14 PRINT "Press any key to continue" DO WHILE INKEY$ = "" LOOP FOR c = 1 TO 20 COLOR c, 0 PRINT "Replace this with the name you want to display" NEXT c COLOR 15, 0 END

Related Questions

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.


What is the code of a c program that will read in a positive integer value and determine If the integer is a prime number and If the integer is a Fibonacci number?

see the program


Write a program to subtract integer y from integer x?

x -=y;


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

the command "display" brings up the ImageMagick program.


How can I write a program to display prime numbers from 1 to 100?

Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.


Is -5 a integer?

1 hour ago my c program said no, but now I know 5 actually is an integer!


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

smallest individual units of a program


What is the program to find sum of n natural numbers in c plus plus?

Initialise an unsigned integer to zero. As each number is input, increment the running total accordingly. When all numbers are input, display the total.


How do you write a Java program to convert a decimal number to an octal number?

public class Dataconversion { public static void main(String[] args) { System.out.println("Data types conversion example!"); int in = 44; System.out.println("Integer: " + in); //integer to binary String by = Integer.toBinaryString(in); System.out.println("Byte: " + by); //integer to hexadecimal String hex = Integer.toHexString(in); System.out.println("Hexa decimal: " + hex); //integer to octal String oct = Integer.toOctalString(in); System.out.println("Octal: " + oct); } }


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.


write a program that will display one if you enter any number without it will display zero in c?

You can use the following C program to display "1" if a user enters any non-zero number, and "0" if the entered number is zero: #include <stdio.h> int main() { int num; printf("Enter a number: "); scanf("%d", &num); if (num != 0) { printf("1\n"); } else { printf("0\n"); } return 0; } This program reads an integer from the user and checks if it is non-zero or zero, then prints the corresponding output.


Program that interprets and display webpages?

browser