#include<conio.h>
#include<stdio.h>
void main(void)
{
int sell_pr, profit, cost_pr, cost_pr_one_item ;
clrscr();
printf("Please enter the selling price of 15 items:");
scanf("%d", &sell_pr);
printf("Please enter the profit earned on 15 items:");
scanf("%d", &profit);
cost_pr = sell_pr - profit;
cost_pr_one_item = cost_pr/15;
printf("Cost price of one item is %d", cost_pr_one_item);
getch();
}
#include<iostream>
#include <string>
#include <sstream>
using namespace std;
double enter_double( string prompt, unsigned int multiple = 15, double min = 0.0 )
{
string input;
double result;
while( 1 )
{
printf( "Enter the %s of %u items: ", prompt.c_str(), multiple );
getline( cin, input );
stringstream( input ) >> result;
if( result < min )
{
printf( "\nERROR: The %s cannot be less than %0.2f\n", prompt.c_str(), min );
continue;
}
result *= 100;
int i = (int) result;
if( i/multiple != result/multiple )
{
printf( "\nERROR: The %s must be an exact multiple of %u\n", prompt.c_str(), multiple );
continue;
}
result = (double)i / 100;
break;
}
printf( "You entered %.2f\n", result );
return( result );
}
int main()
{
double total_selling_price;
double total_profit;
double total_cost;
double item_cost;
total_selling_price = enter_double( "total selling price", 15, 0.15 );
total_profit = enter_double( "total profit", 15, total_selling_price * (-1) );
total_cost = total_selling_price - total_profit;
printf( "Total cost: %0.2f\n", total_cost );
item_cost = total_cost / 15;
printf( "Cost per item: %0.2f\n", item_cost );
return(0);
}
Output:
Enter the total selling price of 15 items: 150.15
You entered 150.15
Enter the total profit of 15 items: 30.45
You entered 30.45
Total cost: 119.70
Cost per item: 7.98
if the total selling price of 15 items and the total profit earned on them is input through keyboard write the program to find the cost price of one item
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
printf(\n "ENTER THE NUMBER\t"); scanf{"%d",&a); while(a!=0); { r=a%2; if(r==0) printf("\n\n THE NUMBER IS EVEN \t"); else printf("\n\n THE NUMBER IS ODD \t"); printf ("\n ENTER THE NUMBER \t"); scanf("%d",&a); } getch(); }
An instruction book or program that takes users through a prescribed series of steps to learn a complex program is called a tutorial.
We use these to make ur project respond through the keyboard
#include<stdio.h> #include<conio.h> int main () { int num; printf("enter the number"); scanf("%d",&num); if(num<0) num=(-1)*num; printf("absolute value=%d",num); getch(); return 0; }
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
nine seven two
the keyboard enable the user to communicate with the computer through typying of(input of data).
Selling can take place through a retail transaction, a business-to-business transaction, or through telemarketing
Selling can take place through a retail transaction, a business-to-business transaction, or through telemarketing
through keyboard
Selling can take place through a retail transaction, a business-to-business transaction, or through telemarketing
Keyboard
Yes, you can replace the keyboard. 1. Go to market place on your phone. 2. Type in keyboard in the search bar and browse through which keyboard you would like to try. ( a very popular, well developed keyboard is smartkeyboard) 3. install the application and follow the instructions as to how to set it is as your default keyboard.
Hold the apple/command key and the (=/+) key and then type what you want...This works in Microsoft word... not such about anything else.
Careers Through Culinary Arts Program was created in 1990.
you press on the arrow keys on the keyboard.