import java.io.*;
class Shop
{
String code[]=new String[20];
String name[]=new String[20];
float price[]=new float[20];
int i,j;
Shop()
{
i=0;
}
void getitem() throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter ItemCode:");
code[i]=br.readLine();
System.out.println("Enter ItemName:");
code[i]=br.readLine();
System.out.println("Enter UnitPrice:");
price[i]=Float.valueOf(br.readLine()).floatValue();
i++;
}
void printitem()
{
System.out.println("\n ItemCode\tItemName\tunitPrice\n");
for(j=0;j<i;j++)
{
System.out.println(code[j]+"\t\t");
System.out.println(name[j]+"\t\t");
System.out.println(price[j]+"\t\t");
}
}
}
class ShopOnl
{
public static void main(String args[]) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int ch=0;
Shop s=new Shop();
while(ch!=3)
{
System.out.println("1.Get Item");
System.out.println("2.View Bill");
System.out.println("3.Quit");
System.out.println("Enter your choice");
ch=Integer.parseInt(br.readLine());
switch(ch)
{
case 1:
s.getitem();
break;
case 2:
s.printitem();
break;
case 3:
System.out.println("Thank you! visit again");
break;
}
}
}
}
echo 'print a pattern'
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 program to print the series 1/12+1/22+.........+1/n2 ?
This is a directive, not a question.
#include
write a program to print A to Z on screen in c?
echo 'print a pattern'
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 program to print the series 1/12+1/22+.........+1/n2 ?
#include<stdio.h> main() { int a; print f("enter your amount "); scan f("%d",&a); }
I am very tempted to write a program to display something rude about your teacher to get you in trouble. I have chosen not too but will give you a hint that will require you to do a small amount of reading and a small amount of thinking. Hello world Programming require reading and thinking, get used to it.
#this program to calculate princple amount using perl. print "enter the amount given;","\n"; $A=<stdin>; print "enter the rate of interst given;","\n"; $R=<stdin>; print "enter the no of years given;","\n"; $Y=<stdin>; $o=1+$R; $e=$o**$Y; $t=1/$e; $f=1-$t; $p= $A*$f; print "princple amount $p";
This is a directive, not a question.
good morning
Yes.
include <stdio.h> int main (void) { puts ("print"); return 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.