Profit or Loss
The amount at which a product is sold by the seller is known as the Selling Price. The amount at which the seller has acquired the product is known as the Cost Price.
If the Selling Price of a product is higher than its cost price, then the seller has made a profit. If it is lesser, then the seller has incurred loss selling that product. If the Selling Price is equal to the Cost Price, it means the seller has made No Profit and No loss, by selling the product.
Given Cost price
The first line is an integer
In the given example,
CP = 143,SP = 155, So as the selling price is higher than the cost price, the output should be Profit.
Sample Input 1
143
155
Sample Output 1
Profit
Sample Input 2
165
125
Sample Output 2
Loss
3-digit Armstrong Number
Write a program to check if a given 3-digit number X is an Armstrong number or not.
Note: A number is an Armstrong number if the number is equal to the sum of the Nth power of its digits.
Input
The first line is an integer X.
Output
The output should be a single line containing True if it satisfies the given conditions, False in all other cases.
Explanation
In the given example X = 371,
The number of digits in 371 is 3.
So, 33 + 73 + 13 = 371. Hence, 371 is an Armstrong number.
So, the output should be True.
Sample Input 1
371
Sample Output 1
True
Sample Input 2
351
Sample Output 2
False
* Make an application with the above classes(invoice,item,itemQuantity,storage) for a client that comes with a list of items * that needs to purchase with the following ruleset: - At the beginning at least 5 different types of items must be added to the storage (use the method addItemQuantity() from Storage.class) - Then create a list of items of the client. - For every item first should be checked if the items are available (use getItemQuantity of Storage.class) - If an item is unavailable do not include it in the invoice - If the item is available include it in the invoice - After all the items are added to the invoice, show all the items added with the description, quantity and cost of the item. This final list should be shown ordered in alphabetical order. - output the invoice into a text file (invoice.text) and save it on the local PC.
Create an employee form that accepts an employee number, employee name, employee surname, employee department, gender, and salary. The form should insert the employee details in the employee database. Include a table that fetches the employee’s details from the database, deletes and updates these details on a table.
Create an employee form that accepts an employee number, employee name, employee surname, employee department, gender, and salary
Write pseudocode, design flow chart and Java program using meaningful variable names, match logic specificed as in pseudocode and flow chart. Collect client information (Last name, first name, middle name (appear in one line) house/unit number, street name, type (appear in one line, city (by itself) & age (by itself) . Initial of first name with full stop, initial of middle name with full stop. Age brackets: 20 or under
21-35
36-70
71 or over
LOOP: (TURBOc++)
Prg15: Write a program that displays a multiplication table for a given number.
Sample output: Enter a number: 3
Multiplication table for 3:
3 x 0 = 0
3 x 1 = 3
3 x 9 =27
PLEASE USE:
#include<stdio.h>
#include<conio.h>
scanf
printf
example:
#include<stdio.h>
#include<conio.h>
main()
{
int n=1, x=20;
clrscr();
printf("While Loop Example");
while (n<=5)
{
gotoxy(x, 3);printf(" %d", n);
n++;x=x+5;
}
getch();
}
LOOP: (TURBOc++)
PRG14. Write a program that will accept 10 numbers, identify if the number is odd or even, then finds the sum of all odd numbers, all even numbers, and total of all the numbers entered.
PLEASE USE:
#include<stdio.h>
#include<conio.h>
scanf
printf
example:
#include<stdio.h>
#include<conio.h>
main()
{
int n=1, x=20;
clrscr();
printf("While Loop Example");
while (n<=5)
{
gotoxy(x, 3);printf(" %d", n);
n++;x=x+5;
}
getch();
}
LOOP: (TURBOc++)
Prg16: Program that accepts a number then output the sum of the squares from 1 to n.
Enter a number : 4
1^2 + 2^2 + 3^2 + 4^2 = 30
PLEASE USE:
#include<stdio.h>
#include<conio.h>
scanf
printf
example:
#include<stdio.h>
#include<conio.h>
main()
{
int n=1, x=20;
clrscr();
printf("While Loop Example");
while (n<=5)
{
gotoxy(x, 3);printf(" %d", n);
n++;x=x+5;
}
getch();
}