All C programming & Algorithm
The algorithm you use in C programming language is also the same algorithm you use in every other language.
15/06/2019
Consumption Unit Rate of Charges For First 50 Units Rs 2.30 Next 50 Units Rs 2.60 Next 150 Units Rs 3.25 More than 250 Units Rs 4.35 Write a program to take no of units consumed from user and calculate the bill Amount. int main() { int unit; float amt, total_amt, sur_charge; /* Input unit consumed from user */ printf("Enter total units consumed: "); scanf("%d", &unit); /* Calculate electricity bill according to given conditions */ if(unit
An Electric power Distribution Company charges its consumers Consumption Unit Rate of Charges For First 50 Units Rs 2.30 Next 50 Units Rs 2.60 Next 150 Units Rs 3.25 More than 250 Units Rs 4.35 Write a program to take no of units consumed from user and calcu…
15/06/2019
Levels Perks Conveyance Allowance Entertainment Allowance 1 1000 500 2 750 200 3 500 100 4 250 0 Income tax is deducted from the salary on a percentage basis as follows.
https://allcprogrammingandalgorithm.wordpress.com/2019/06/15/a-manufacturing-company-classified-its-executives-into-4-levels-for-the-benefit-of-certain-perks-the-levels-and-corresponding-perks-are-shown-below/
, List, , C Programming Example, Example, , LIst Stack, Stack, Queue, Queue, Queue,
Ended Queue (Dequeue), Search, Search, Sort, Sort, Sort, Sort, Sort, Sort, Sort, Doubly Linked List,
Singly Linked List, Linked Lists, Linked Lists, AND SEARCHING, , c programs, c language, Programming,
https://allcprogrammingandalgorithm.wordpress.com/
A manufacturing company classified its executives into 4 levels for the benefit of certain perks. The levels and corresponding perks are shown below: table, th, td { border: 1px solid black; text-align:center; } Levels PerksConveyance AllowanceEntertainment Allowance110005002750200 350010042500 Income tax is deducted from the salary on a percent…
15/06/2019
=================== Marks Grade =================== 0‐34 Fail 35‐59 Second Class 60‐79 First Class 80‐59 Dist void main() { char name; int roll_no,sub1,sub2,sub3,total; float avg; printf("\n\nEnter name of the student="); scanf("%s",name); printf("\n\nEnter roll number of the student="); scanf("%d",&roll_no); printf("\n\nEnter marks of maths="); scanf("%d",&sub1); printf("\n\nEnter marks of physics="); scanf("%d",&sub2); printf("\n\nEnter marks of chemistry="); scanf("%d",&sub3); total=sub1+sub2+sub3; avg=total/3; printf("\n\nTotal=%d",total); printf("\n\nAverage=%f\n\n",avg); if(avg>=0 && avg=35 && avg=60 && avg
Write a program to read marks from keyboard and your program should display equivalent grade according to following table. =================== Marks Grade =================== 0‐34 Fail 35‐59 Second Class 60‐79 First Class 80‐59 Dist void main() { char name[50]; int …
15/06/2019
Mathematics >= 50 Physics >= 45 Chemistry >= 60 Total of all subject >= 170 OR Total of Mathematics + Physics >= 120 Accept the marks of all the three subjects from the user and check if the student is eligible for admission. Print the message : Student is eligible for Admission OR Student is not eligible for admission void main() { int math,phy,che,total,totalmp; printf("\n\nEnter the marks of mathematics="); scanf("%d",&math); printf("\n\nEnter the marks of physics="); scanf("%d",&phy); printf("\n\nEnter the marks of chemistry="); scanf("%d",&che); total=math+phy+che; totalmp=math+phy; printf("\n\nTotal of all subject=%d",total); printf("\n\nTotal of mathematics and physics=%d",totalmp); if(math>=50&&phy>=45&&che>=60&&total>=170&&totalmp>=120) { printf("\n\n\n\n\nStudent is eligible for admission\n\n\n"); } else { printf("\n\n\n\n\nStudent is not eligible for admission\n\n\n"); } }
, List, , C Programming Example, Example, , LIst Stack, Stack, Queue, Queue, Queue, Ended Queue (Dequeue), Search, Search, Sort, Sort, Sort, Sort, Sort, Sort, Sort, Doubly Linked List, Singly Linked List, Linked Lists, Linked Lists, AND SEARCHING, , c programs, c language, Programming,
Write a program to check eligibility of student for admission. Student should fulfill the following criteria for admission : Mathematics >= 50 Physics >= 45 Chemistry >= 60 Total of all subject >= 170 OR Total of Mathematics + Physics >= 120 Accept the marks of all the three subjects from the user and chec…
15/06/2019
Gross Salary = Basic Pay + DA + HRA – PF. DA = 30% If Basic Pay < 5000 otherwise DA = 45% of the Basic Pay. HRA = 15% of Basic Pay. PF = 12% of Basic Pay. void main() { float gs,bp,DA,HRA,PF; printf("\n\nEnter basic pay="); scanf("%f",&bp); if (DA
Write a program in C to calculate gross salary of employee using : Gross Salary = Basic Pay + DA + HRA – PF. DA = 30% If Basic Pay < 5000 otherwise DA = 45% of the Basic Pay.HRA = 15% of Basic Pay. PF = 12% of Basic Pay. void main() { fl…
15/06/2019
int main() { int week; printf("enter the week number(1-7)"); scanf("%d",&week); switch(week) { case 1: printf("monday"); break; case 2: printf("tuesday"); break; case 3: printf("wednesday"); break; case 4: printf("thusday"); break; case 5: printf("friday"); break; case 6: printf("saterday"); break; case 7: printf("sunday"); break; default: printf("invalid number"); } return 0; }
Write a program that read a number from 1 TO 7 and then print corresponding day name from the week using switch‐case. int main() { int week; printf(“enter the week number(1-7)”); scanf(“%d”,&week); switch(week) { case 1: printf(“monday”); break; case …
15/06/2019
void main() { char oper; int num1,num2,ans; printf("\nEnter Arithmetic operator===>" ); oper=getchar(); printf("\nEnter first value=" ); scanf("%d",&num1); printf("\nEnter second value=" ); scanf("%d",&num2); if(oper=='+') { ans=num1+num2; printf("\n\n\t ans is..%d\n\n",ans); } else if(oper=='-') { ans=num1-num2; printf("\n\n\t ans is..%d\n\n",ans); } else if(oper=='*') { ans=num1*num2; printf("\n\n\t ans is..%d\n\n",ans); } else if(oper=='/') { ans=num1/num2; printf("\n\n\t ans is..%d\n\n",ans); } }
Write a program in C to enter any arithmetic operator (+ ‐ * /) and two integer values and display result according to selection of operator. void main() { char oper; int num1,num2,ans; printf(“ Enter Arithmetic operator===>” ); oper=getchar(); printf(“ Enter first value=” ); scanf(& #8…
14/06/2019
void main() { int yr; printf("\nEnter year="); scanf("%d",&yr); if(yr%4==0) { if(yr%100==0) { if(yr%400==0) { printf("\n\n\t\t ** %d is Leap year **\n",yr); } else { printf("\n\n\t\t not Leap year. Century year..\n"); } } else{ printf("\n\n\t\t Leap year...\n"); } } else{ printf("\n\n\t\t Not a Leap year...\n"); } }
Write a program to Find out given year which is leap or not. void main() { int yr; printf(“ Enter year=”); scanf(“%d”,&yr); if(yr%4==0) { if(yr%100==0) { if(yr%400==0) { printf(“ \t\t ** %d is Lea…
14/06/2019
void main() { int a,b,c; printf("\n\nEnter three numbers="); scanf("%d %d %d",&a,&b,&c); if (a
Write a program to arrange any three numbers in ascending order. void main() { int a,b,c; printf(“ Enter three numbers=”); scanf(“%d %d %d”,&a,&b,&c); if (a
Click here to claim your Sponsored Listing.
Category
Contact the business
Address
Ahmednagar
380024
22/09/2020
22/09/2020