Opening Ceremony
Bhim Higher Secondary School Suntopar, Dolakha
Opening Ceremony
Bhim Higher Secondary School Suntopar, Dolakha
JCT Students (First Batch(2069-2070))
Bhim Higher Secondary School Suntopar, Dolakha
Opening Ceremony
Bhim Higher Secondary School Suntopar, Dolakha
Opening Ceremony
Bhim Higher Secondary School Suntopar, Dolakha
Showing posts with label C programming. Show all posts
Showing posts with label C programming. Show all posts
Wednesday, August 3, 2016
Monday, August 1, 2016
Sunday, July 31, 2016
Program in C to find the factorial of a given number
#include<stdio.h>
#include<conio.h>
void main()
{
int i, num, fact = 1;
printf("\n Enter a number to calculate it's factorial : ");
scanf("%d", &num);
for (i = 1; i <= num; i++)
fact = fact * i;
printf(" Factorial of %d = %d\n", num, fact);
getch();
}
Program in C to find sum, difference and product of 2 numbers using switch case statement
/* Program in C to find sum, difference and product of 2 numbers using switch case statement */
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,ch;
printf("\n Enter First Number :");
scanf("%d",&a);
printf("\n Enter Second Number :");
scanf("%d",&b);
printf("\n Enter Your Choice: ( 1. Sum: 2. Difference : 3. Product: ) ");
scanf("%d",&ch);
switch (ch)
{
case 1:
{
printf("\n The sum = %d",a+b);
break;
}
case 2:
{
printf("\n The difference = %d",a-b);
break;
}
case 3:
{
printf("\n The Product = %d",a*b);
break;
}
default:
{
printf("\n out of range");
}
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,ch;
printf("\n Enter First Number :");
scanf("%d",&a);
printf("\n Enter Second Number :");
scanf("%d",&b);
printf("\n Enter Your Choice: ( 1. Sum: 2. Difference : 3. Product: ) ");
scanf("%d",&ch);
switch (ch)
{
case 1:
{
printf("\n The sum = %d",a+b);
break;
}
case 2:
{
printf("\n The difference = %d",a-b);
break;
}
case 3:
{
printf("\n The Product = %d",a*b);
break;
}
default:
{
printf("\n out of range");
}
}
getch();
}
Tuesday, July 26, 2016
Wednesday, December 18, 2013
What is C, What is C++, and What is the Difference?
C is a programming language originally developed for developing the Unix operating system. It is a High-level (also called Middle-level) and powerful language, but it lacks many modern and useful constructs. C++ is a newer language, based on C, that adds many more modern programming language features that make it easier to program than C.
Basically, C++ maintains all aspects of the C language, while providing new features to programmers that make it easier to write useful and sophisticated programs.
Basically, C++ maintains all aspects of the C language, while providing new features to programmers that make it easier to write useful and sophisticated programs.
For example, C++ makes it easier to manage memory and adds several features to allow "object-oriented" programming and "generic" programming. Basically, it makes it easier for programmers to stop thinking about the nitty-gritty details of how the machine works and think about the problems they are trying to solve.
So, what is C++ used for?
C++ is a powerful general-purpose programming language. It can be used to create small programs or large applications. It can be used to make CGI scripts or console-only DOS programs. C++ allows you to create programs to do almost anything you need to do. The creator of C++, Bjarne Stroustrup, has put together a partial list of applications written in C++.
Subscribe to:
Posts (Atom)






















