#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float tax_rate;
printf("Please enter tex rate percentage: ");
scanf("%f",&tax_rate);
int no_of_cats;
printf("Please enter the no of cats sold: ");
scanf("%d",&no_of_cats);
float cat_price;
printf("Please enter the price of one cat: ");
scanf("%f",&cat_price);
int no_of_dogs;
printf("Please enter the no of dogs sold: ");
scanf("%d",&no_of_dogs);
float dog_price;
printf("Please enter the price of one dog: ");
scanf("%f",&dog_price);
double total_cat_price = no_of_cats * cat_price;
double total_dog_price = no_of_dogs * dog_price;
printf("Total price of cats sold: %lf\n",total_cat_price);
printf("Total price of dogs sold: %lf",total_dog_price);
getch();
}
Help. In language c View Layout References Mailings Program 1 Write a simple invoice generating program...
Please code in c 1. Write a program which does the following: Declare and initialize three pointers. One points to an integer, one points to a float and one points to a character variable Ask the user to enter appropriate values for these variables. Output the values to the screen by accessing the variables directly and then by using pointer references. Print the address of each variable. Modify the variables by performing any arithmetic operation only using pointer refer- ences...
Write a complete C++ program to ask the user to enter 4 integers. The program must use a function to find the smallest integer among them and print it on the screen. Typical output screen should be as following: Write a complete C++ program to ask the user to enter 4 integers. The program must use a functionto find the smallest integer among them and print it on the screen. Typical output screen should be as following: Note: the code...
Please help with this assignment. Thanks. 1. Write a C++ program containing a class Invoice and a driver program called invoiceDriver.cpp. The class Invoice is used in a hardware store to represent an invoice for an item sold at the store. An invoice class should include the following: A part number of type string A part description of type string A quantity of the item being purchased of type int A price per item of type int A class constructor...
Write a complete C++ program to ask the user to enter 4 integers. The program must use a function to find the LARGEST integer among them and print it on the screen. Typical output screen should be as following: Note: the code must contain function to find the LARGEST number. Enter four integers 1 2 4 0 Largest integer is 4
Problems: 1. Write a program to define the following variables, assign them values, and print their values on screen: Integer x = 20, Float y = 40.45 Double z = 91.51e+5 Char w = A • • For the integer variable x, you need to print it in decimal notations, octal notations and hexadecimal notation. For the double variable y, you need to print it in double notations and scientific notation. 2. Write a program with the following three parts:...
Write a complete C++ program to ask the user to enter 4 integers. The program must use a function to find the largest integer among them and print it on the screen. Typical output screen should be as following: Note: the code must contain function to find the largest number. Enter four integers 1 2 4 0 Largest integer is 4 03 (35 points)
Write a C program to sum up all the odd numbers between a lower limit number and an upper limit number provided by a user. The requirements are: First, request the user to provide a lower limit integer number and an upper limit integer number that is larger than the lower limit number, and save them in variables lowerLimit and upperLimit, respectively. If the user has entered an upper limit number (upper Limit) that is NOT larger than the lower...
Document2 Tell me Layout References Mailings Review View 1. Write a program named Lab17B that will read 2 strings and compare them. a. Create a bool function named compareLetters that will accept 2 string variables as parameters and will return true if the strings have the same first letters and the same last letters. It will return a false otherwise. b. Create a bool function named inside that will accept the 2 string variables in the order they were entered)...
Write the program in C The following statistics for cities of the Vege country are stored in a file: Name: a string of characters less than 15 characters long. Population: an integer value. Area: square miles of type double Write a program that: asks and gets the name of the input file from the user. Read the contents of the file into an array length 10 of structures -ask the user for the name of a city (less than 15...
Pointer tasks: ( In C++ ) 1. Write a program to store the address of a character variable and a float variable. • Print the address of both variables. • Print the values of variable using dereference operator. • Add 2 in float value using pointer. • Print address of character variable using reference operator. 2. Write a program that takes 5 elements in an array and print them in reverse order using pointers. 3. Write to program that takes...