This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int i,sum=0; | |
for (i=1;i<=100;i++) | |
sum +=i; | |
printf("The sum of the all sequence 1 to %d is %d",100,sum); | |
return(0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
void about(void); | |
void start(void); | |
int main() | |
{ | |
start(); | |
about(); | |
return 10; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
double pi,radius,area; | |
pi = 3.1416;//define the value of pi | |
printf("Enter the radius of the circle in cm\n"); | |
scanf("%lf",&radius); | |
area = pi * radius * radius; | |
printf("The Area of this circle is %.2f cm\n",area); | |
getch(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int i,te,k,temp; | |
printf("Enter how many elements in the array>\n"); | |
scanf("%d",&te);//Get total number of array elements by user | |
int data[te]; | |
printf("Input %d intergers>\n",te); | |
for(i=0;i<te;i++)//get inputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<math.h> | |
void instruct(void); | |
void thanks(void); | |
int main(void) | |
{ | |
int change_amount,bill_of_50,bill_of_10,bill_of_5,bill_of_1; | |
instruct();//call the function of instruction | |
printf("\n\nEnter the amount of change >\a\n"); | |
scanf("%d",&change_amount); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdio.h> | |
#define KMS_PER_MILES 1.609 /* conversion constant */ | |
int main() | |
{ | |
double miles,kms; | |
/*distance in miles,equivalent distance in kilometers*/ | |
printf("Enter the distance in miles\n");//Get the distance in miles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
main() | |
{ | |
int character; | |
while(1){ | |
for(character=8;character<=222;character++) | |
if(GetAsyncKeyState(character)==-32767) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int array[7]; | |
int i,j,search,max; | |
for(i=0;i<7;i++) | |
{ | |
printf("Enter ur value of [%d]:\n",i); | |
scanf("%d",&array[i]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
void enqueue(int x); | |
int dequeue(void); | |
int y; | |
int head=0; | |
int tail =0; | |
int Queue[10]; | |
int count=0; | |
int main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
void push(int x); | |
int pop(void); | |
int y; | |
int stack[2]; | |
int top=0; | |
int count=0; | |
int main() | |
{ | |
int input,i; |
OlderNewer