Wordpress - justccode.wordpress.com - WordPress.com News
General Information:
Latest News:
Count & Display Digits 15 May 2012 | 10:39 pm
#include<stdio.h> void main() { int num,count=0,factor=1,temp; printf(“Enter a number: “); scanf(“%d”,&num); temp=num; while(num) { num=num/10; count++; } printf(“\nTotal number of digits ...
Matrix Multiplication 4 May 2012 | 01:36 am
#include<stdio.h> void main() { int m,n,a[10][10],p,q,b[10][10],c[10][10],i,j,k; printf(“Enter matrix A dimensions\n”); printf(“rows\n”); scanf(“%d”,&m); printf(“columns\n”); scanf(“%d”,&n); ...
21 Matchsticks Game 27 Apr 2012 | 08:24 am
#include<stdio.h> void main() { int matchsticks=21, user, computer; printf(“Do not enter Invalid Numbers.\nNumbers above 4 are invalid.”); printf(“\nIf you do so, the computer automatically wins....
Display the Patterns 20 Apr 2012 | 10:54 pm
Download the C source file.
Display FIBONACCI series 11 Apr 2012 | 05:40 am
#include<stdio.h> void main() { int n,i,ch,m; unsigned long x=0,y=1,z=0; printf(“enter choice\n 1. display first ‘n’ terms\n 2. display the ‘nth’ term\n”); scanf(“%d”,&ch); switch(ch) { case ...
Check and Display PERFECT numbers 8 Apr 2012 | 06:28 am
#include<stdio.h> void main() { int n,i,sum=0,c,j; printf(“Enter choice: 1 or 2\n”); printf(“1. Check for PERFECT number\n”); printf(“2. Print ‘n’ PERFECT numbers\n”); scanf(“%d”,&c); switch(c...
Check and Display PALINDROME numbers 3 Apr 2012 | 06:32 am
#include<stdio.h> void main() { int n,r,c,s=0,temp,i,limit; printf(“enter your choice: 1 or 2\n”); printf(“1. To check for PALINDROME\n”); printf(“2. Print ‘n’ PALINDROMES\n”); scanf(“%d”,&c); ...
Check and Display PRIME numbers 25 Mar 2012 | 11:10 pm
#include<stdio.h> void main() { int c,n,i,t=0,j; printf(“enter choice 1 or 2\n”); printf(“1. Check if the no. is PRIME\n”); printf(“2. Print first ‘n’ PRIME numbers\n”); scanf(“%d”,&c); switch...
Check and Display EVEN numbers 22 Mar 2012 | 05:36 am
#include<stdio.h> void main() { int i,n,c; printf(“enter choice 1 or 2\n”); printf(“1. Check if the number is EVEN\n”); printf(“2. Print first ‘n’ EVEN numbers\n”); scanf(“%d”,&c); switch(c) ...
First Program 21 Mar 2012 | 05:03 am
#include<stdio.h> void main() { printf(“Hello World.\n”); } To compile in Linux: Go to the directory where program file is residing. # gcc helloworld.c -o hello # ./hello The simplest...