# @thareefahamed_s

## Sum of even numbers

October 19, 2020 · C
#include <stdio.h>

int main() {
printf("SUM OF EVEN NUMBERS\n");
printf("-------------------\n");
int i,sum;
printf("The first ten even numbers are\n");
for(i=0;i<21;i=i+2)
{
printf("%d\t",i);
sum+=i;

## Sum of n natural numbers

October 19, 2020 · C
#include <stdio.h>

int main() {
printf("SUM OF n NATURAL NUMBERS\n");
printf("----------------------------");
int i,sum;
printf("The first ten natural numbers are\n");
for(i=1;i<11;i++)
{
printf("%d\t",i);
sum+=i;

## Largest number

October 19, 2020 · C
#include <stdio.h>

int main() {
printf("FIND THE LARGEST NUMBER\n");
printf("************************\n");
int a,b,c;
printf("Enter the first number:");
scanf("%d",&a);
printf("%d\n",a);
printf("Enter the second number:");
scanf("%d",&b);

## Quotient and remainder

October 19, 2020 · C
#include <stdio.h>

int main() {
printf("QUOTIENT AND REMAINDER\n");
printf("**************************\n");
int a,b,quotient,remainder;
printf("Enter the first value:");
scanf("%d",&a);
printf("%d\n",a);
printf("Enter the second value:");
scanf("%d",&b);

## Sum and average

October 19, 2020 · C
#include <stdio.h>

int main()
{
printf("SUM AND AVERAGE OF THREE NUMBERS\n");
printf("**********************************\n");
int num_1,num_2,num_3,sum,average;
printf("enter the first no:");
scanf("%d",&num_1);
printf("%d\n",num_1);
printf("enter the second no:");

## Swapping

October 15, 2020 · C
#include <stdio.h>

int main() {
int first_no,second_no;
printf("SWAPPING PROGRAM\n");
printf("-----------------\n");
printf("Enter the first number:");
scanf("%d",&first_no);
printf("%d\n",first_no);
printf("Enter the second number:");
scanf("%d",&second_no);

## Enumerated data type

September 25, 2020 · C
#include <stdio.h>
enum week{mon=11,tues,wed,thurs,fri,sat,sun};

int main() {
printf("##ENUMERATED DATA TYPE##\n");
printf("*************************\n");

printf("The values of week is %d\t%d\t%d\t%d\t%d\t%d\t%d\n",mon,tues,wed,thurs,fri,sat,sun);
printf("\t---------------");
return 0;
}

## Swapping

September 23, 2020 · C
#include <stdio.h>

int main() {
printf("#S_W_A_P_P_I_N_G EXAMPLE#\n");
printf("..........................\n");
int first_no,second_no;
printf("Enter the value for first number:");
scanf("%d",&first_no);
printf("%d\n",first_no);
printf("Enter the value for second number:");
scanf("%d",&second_no);

## Sizes of data types

September 23, 2020 · C
#include <stdio.h>

int main() {
int a;
short int b;
long int c;
float d;
double e;
long double f;
char g;
printf("#SIZES OF DATA TYPES IN BYTES#\n");