#include <iostream> void main() { using namespace std; int num, rem, sum=0; //Declaring variables cout<<"Enter a number :"<<endl; cin>>num; //Loop to calculate the sum of the digits of the given number. while(num!=0) { rem=num%10; num=num/10; sum=sum+rem; } cout<<"Sum of the digits is "<<sum<<endl; cin.get(); }
class prime
{
public static void main(String p[])
{
int i,j,s=0,d=0;
for(i=1;i<100;i++)
{
s=0;
for(j=1;j<=i;j++)
{
if(i%j==0)
s=s+1;
}
if(s==2)
{
System.out.println(i);
d=d+1;
}
}
System.out.println("the no. of prime no. are = "+d);
}
}
Read more: http://wiki.answers.com/Simple_java_program_to_find_prime_numbers#ixzz269bk91Ms
{
public static void main(String p[])
{
int i,j,s=0,d=0;
for(i=1;i<100;i++)
{
s=0;
for(j=1;j<=i;j++)
{
if(i%j==0)
s=s+1;
}
if(s==2)
{
System.out.println(i);
d=d+1;
}
}
System.out.println("the no. of prime no. are = "+d);
}
}
There is nothing needed as input.
But if "input" as the argument passing to a routine, it depends on the routine.
It can be a function to determine any given integer (here's the input) is a prime or not, or it can be a function to return all the prime numbers within a range (1 to 100 in this case).
linearly
mesh's basic salary is input through the keyboard. his dearness allowance is 40% of basic salarying , and house rent allowance is 20% of basic salaried. write a program to calculate his gross salary
To write a C++ program to display the student details using class and array of object.
create a program that can input 100 names
Yacc provides a general tool for imposing structure on the input to a computer program. The Yacc user prepares a specification of the input process; this includes rules describing the input structure, code to be invoked when these rules are recognized, and a low-level routine to do the basic input. Yacc then generates a function to control the input process. This function, called a parser, calls the user-supplied low-level input routine (the lexical analyzer) to pick up the basic items (called tokens) from the input stream.
An input stream is a character sequence device or buffer from which input can be gathered. The standard input stream is usually a keyboard, data file or the output stream from another program. The user of the program can normally decide where standard input may be redirected from when launching the program, typically defaulting to the keyboard.
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.
basic input output system (BIOS)
dim a input a
mesh's basic salary is input through the keyboard. his dearness allowance is 40% of basic salarying , and house rent allowance is 20% of basic salaried. write a program to calculate his gross salary
there is no bios setup program but BIOS stands for basic input output system
Basic Input/Output System (BIOS)
take input n chodo
You type it in with your keyboard.
In a computer program, a legal input is something that can be put into a program and it will work. An illegal input may crash the program.
To write a C++ program to display the student details using class and array of object.
Initialise an unsigned integer to zero. As each number is input, increment the running total accordingly. When all numbers are input, display the total.
Since you didn't specify, I will give you the answer for a TI 83 Plus Silver Addition :Input A :Input B :ClrHome <--found in the prgm menu with input :Output(1,1,A+B) <--Output also found in same menu as ClrHome :Output(4,1,A*B)