Showing posts with label problem solving and program design in c. Show all posts
Showing posts with label problem solving and program design in c. Show all posts

Monday, December 17, 2012

Use of if logical operators

1st about discount using if and logical operators
#include <stdio.h>
#include <conio.h>

void main()
{
int ppi;
int ib;
int tp;
int dis;
clrscr();

printf("price per item\n");
scanf("%d",&ppi);
printf("items bought\n");
scanf("%d",&ib);


tp=ppi*ib;

printf("total price =%d\n",tp);

if(ib>1&&ib<=15){
dis=tp-(tp*5)/100;
printf("discounted Price %d",dis);

Wednesday, December 12, 2012

problem solving and program design in c




Problem Solving and Program Design in C is one of the best-selling introductory programming textbooks using the C programming language. It embraces a balanced approach to program development and an introduction to ANSI C. The book provides a gradual introduction to pointers and covers programming with functions early in the text. In later chapters, students learn to implement fundamental data structures such as lists, stacks, queues, and trees in a language that fosters their understanding of stack- and heap-dynamic memory allocation and programmer-controlled pointers. To enhance students' learning experience it offers the right amount of pedagogical features that include end-of-section and chapter exercises, examples and case studies, syntax and program style display boxes, error discussions and end-of-chapter projects.
Book Download Link