let us C
else if question in c output of the following program
else if question in c output of the following program
C program to calculate simple interest using function
C program to calculate simple interest using function Let’s understand the steps: Formula To find simple interest Simple Interest = (p * n * r) / 100 where, p = Principal Amount, n = Number of Years / Period … Read more
Which of the following shows the correct hierarchy of arithmetic operations in C
Which of the following shows the correct hierarchy of arithmetic operations in C
In c programing break statement is used to exit from
In c programing break statement is used to exit from
Egg Game Program in C Langauage
Egg Game Program in C Langauage #include<dos.h> #include<graphics.h> #include<stdio.h> #include<conio.h> #include<process.h> #include<dos.h> #include<stdlib.h> #include<iostream.h> union REGS i,o; main() { int initmouse(); int restrictmouseptr(int,int,int,int); int getmousepos(int *,int *,int *); int showmouseptr(); int gd=DETECT,gm,maxx,maxy,x,y,button; initgraph(&gd,&gm,””); int count=0; maxx=getmaxx(); maxy=getmaxy(); setbkcolor(1); setviewport(0,0,maxx,maxy,1); gotoxy(26,1); if(initmouse()==0) { closegraph(); restorecrtmode(); //to go back to normal graphics mode or deleting viewport. … Read more
C program to print Fibonacci series
C program to print Fibonacci series Fibonacci series is a series of number in which each number is the sum of preceding two numbers. for example: 0 1 1 2 3 5 8 13 21 … The next number is found by adding up the two numbers before it as : The 2 is found … Read more
an algorithm to find the factorial of a number
What is algorithm An algorithm is step by step description of the method to solve a problem. It is an effective procedure for solving a problem in a finite number of steps an algorithm to find the factorial of a number How to start writing algorithm : Step by Step solve the problem Problem Description … Read more
C program to find number of days in a month
C program to find number of days in a month This is a simple program to get number of days in a month. Leap year is not being chacked in the program. This program uses switch case. #include <stdio.h> int main() { int month; int days; printf(“Enter month: “); scanf(“%d”,&month); switch(month) { case 4: case … Read more