import java.io.InputStreamReader;
import java.io.BufferedReader;
public class Sum
{
static int i;
static int j;
static int sum;
public static void main(String args[])
{
try
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter first no.");
i=Integer.parseInt(br.readLine());
System.out.println("enter second no.");
j=Integer.parseInt(br.readLine());
sum=i+j;
System.out.println("sum of both no is:="+sum);
}
catch(Exception e)
{
System.out.println("Exception is:-"+e);
}
}
}
The instruction register.
write a program which reads names of students and their telephones from a file and produce a linked list ordered in alphabetical order by the surname of the student.
#include <cstdio> int main() { int x[10]; printf("Enter 10 integers: \n"); for(int i = 0; i < 10; i++) { scanf("%d", &x[i]); } for(int i = 0; i < 10; i++) { printf("%d, ", x[i]); } char wait; scanf("%s", wait); return 0; }
// Get input BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String input = in.readLine(); in.close(); // Parse input int sum = 0; StringTokenizer parser = new StringTokenizer(input); while (parser.hasMoreTokens()) { int currentInt = Integer.parseInt(parser.nextToken()); System.out.println(currentInt); sum += currentInt; } System.out.println("sum = " + sum);
write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program
Certainly! Here's a simple pseudocode snippet that reads two numbers, multiplies them together, and prints out their product: 1. Read firstNumber 2. Read secondNumber 3. product = firstNumber * secondNumber 4. Print product In this pseudocode, we first read the two numbers, then multiply them to calculate the product, and finally print out the result.
A compiler.
yes possible
The instruction register.
Interpreter
It is WordQ. It is a program that you buy to install on your computer and you use Microsoft word or any other typing program to get it to read what you typed.
The user interface interprets the command and passes the program name to the file system, which reads the directory.
write a program which reads names of students and their telephones from a file and produce a linked list ordered in alphabetical order by the surname of the student.
#include <cstdio> int main() { int x[10]; printf("Enter 10 integers: \n"); for(int i = 0; i < 10; i++) { scanf("%d", &x[i]); } for(int i = 0; i < 10; i++) { printf("%d, ", x[i]); } char wait; scanf("%s", wait); return 0; }
It depends on the program source and what format it's using. The TV's only displaying the information it reads from the incoming signal.
// Get input BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String input = in.readLine(); in.close(); // Parse input int sum = 0; StringTokenizer parser = new StringTokenizer(input); while (parser.hasMoreTokens()) { int currentInt = Integer.parseInt(parser.nextToken()); System.out.println(currentInt); sum += currentInt; } System.out.println("sum = " + sum);
ntldr (NT Loader)