Browsing Category

Computer Science

[C/C++] Program to Find Prime Number Between Given Range

What is a Prime Number? " A Natural number greater than 1 which has only two divisor 1 and itself is called prime number ". For Example: 5 is prime, because it has only two divisors 1 and itself. C Code #include <stdio.h>…

[C/C++] Program to Find Prime Number

What is a Prime Number? " A Natural number greater than 1 which has only two divisor 1 and itself is called prime number ". For Example: 5 is prime, because it has only two divisors 1 and itself. C Code #include <stdio.h>…

[C/C++] Program to Find Perfect Number

What is a perfect number? "Perfect number is a positive number which sum of all positive divisors excluding that number." For example 6 is Perfect Number since divisor of 6 are 1, 2 and 3. Sum of its divisor is 1 + 2+ 3 =6 and 28 is…

So as usual like everyone i like to start these tutorial with very basic questions like what is C? What are compilers? and many others blah blah. Because this is what you should know before getting start C. These are just basic information…

[C/C++] Program to Sort Array – Bubble Sorting

C/C++ code to arrange number in ascending or descending order using bubble sorting algorithm. In bubble sorting 1st element is compared with 2nd element and then swapped. Similarly 2nd with 3rd and then 3rd with 4th and so on.. Unless the…

[C/C++] Program to Raise a Number “n” to Positive Power “x”

C Code #include<stdio.h> #include<conio.h> void main() { int x,n,result=1; clrscr(); printf("Enter Number \"n\": "); scanf("%d",&n); printf("\nEnter Power to Raise \"x\": "); scanf("%d",&x);…

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More