Posts

Showing posts from August, 2021

Bank Atm project using C Programming

Image
 #include<stdio.h> #include<stdlib.h> void deposite(); void withdrawl(); void balancecheck(); void transfer(); int tac=5000,inac,tamt; int *rtac; float mb=20000; int depo; int wdrawl; char ch; int main() { printf("$*****----Welcome to our bank----*****$\n"); int choice; up: up1: printf("Press 1 for deposite\n"); printf("Press 2 for withdrawl\n"); printf("Press 3 for balance check\n"); printf("Press 4 for balance transfer\n"); printf("Press 5 for log out\n"); scanf("%d",&choice); switch(choice) {    case 1: deposite(); up2: printf("\nPress y for continue\nPress n for exit"); ch=getch(); system("cls"); if(ch=='y' || ch=='Y') { goto up1; } else if(ch=='n' ||ch=='N') { printf("Thank you\n\n"); exit(0); } else { printf("Press y for continue & n for exit"); got...

Indian Flag INDEPENDENCE DAY SPECIAL CODING

Image
 #include<stdio.h> #include<graphics.h> #include<math.h> int main() { int gd,gm; int r,i,a,b,x,y; float PI=3.14; detectgraph(&gd,&gm); initgraph(&gd,&gm,"C:\\TURBOC3\\BGI"); //draw the top rectangle and color it setcolor(RED); rectangle(100,100,450,150); setfillstyle(SOLID_FILL,RED); floodfill(101,101,RED); //draw the middle rectangle and color it setcolor(WHITE); rectangle(100,150,450,200); setfillstyle(SOLID_FILL,WHITE); floodfill(101,151,WHITE); //draw the bottom rectangle and color it setcolor(GREEN); rectangle(100,200,450,250); setfillstyle(SOLID_FILL,GREEN); floodfill(101,201,GREEN); //draw the circle a=275; //center b=175; //center r=25; //radius setcolor(BLUE); circle(a,b,r); //spokes for(i=0;i<=360;i=i+15) { x=r*cos(i*PI/180); y=r*sin(i*PI/180); line(a,b,a+x,b-y); }             getch();             ...

C Program to Convert the Temperature from Celsius to Fahrenheit. Programming With Me.

Image
  C Program to Convert the Temperature from Celsius to Fahrenheit. Programming With Me. # include <stdio.h> int main() { float celsius, fahrenheit; printf("\n Enter the temprature in Celsius : "); scanf("%f",&celsius); fahrenheit = (celsius*9.0)/5+32; printf("\n Tempareture in fahrenheit : %.2f",fahrenheit); printf("\n Enter the tempareture in fahrenheit :"); scanf("%f",&fahrenheit); celsius = (fahrenheit-32)*5/9; printf("\n Tempareture in Celsius : %.2f",celsius); return 0; } Output

Write a program to calculate the bill amount for an item given its quantity sold, value, discount ,and tax.

Image
#include <stdio.h> int main() { float total_amt,amt, sub_total,discount_amt, tax_amt,qty,val,discount,tax; printf ("\n Enter the quantity of item sold: "); scanf("%f",&qty); printf("\n Enter the value of item: "); scanf("%f", & val); printf("\n Enter the discount percentage: "); scanf("%f", &discount);  printf("\n Enter the tax: "); scanf("%f", &tax); amt = qty * val; discount_amt = (amt * discount)/100.0; sub_total = amt - discount_amt; tax_amt =(sub_total * tax)/100.0; total_amt = sub_total + tax_amt; printf("\n\n\n ************BILL***********"); printf("\n Quantity Sold: %f", qty); printf("\n Price per item: %f",val); printf("\n ----------------"); printf("\n Amount:%f",discount_amt); printf("\n Discount:%f",discount_amt); printf("\n Discounted total: %f", sub_total); ...