Skip to main content

Posts

Showing posts from June 13, 2017

BASIC C PROGRAMS

1.Write a program to print a string in C language #include<stdio.h> #include<conio.h> main() { clrscr(); printf("\nKodeGod.com"); getch(); } 2.Write a program to accept values of two numbers and print their addition #include<stdio.h> #include<conio.h> main() { int a,b,c; clrscr(); printf("Enter number 1: "); scanf("%d",&a); printf("Enter number 2: "); scanf("%d",&b); c=a+b; printf("Addition is : %d",c); getch(); } 3.Write a program to accept values of two numbers and print their subtraction  #include<stdio.h> #include<conio.h> main() { int a,b,c; clrscr(); printf("Enter number 1: "); scanf("%d",&a); printf("Enter number 2: "); scanf("%d",&b); c=a-b; printf("Subtraction : %d",c); getch(); } 4.Write a program to accept values of two numbers and print their multiplication in C langua