C PROGRAMMING

Advertisements

printf(“Welcome”);

Software required-Dev C++-download link-

Advertisements

Software used in UniMAP-CodeBlocks

Download link-

How to install CodeBlocks without any errors-sponsored by KAT TECHNOLOGIES-

1.First coding in C

Advertisements
//www.arvindunimap.com
#include<stdio.h>
int main()
{
printf("Welcome to UniMAP");
return 0;
}

2.Bmi Calculating Coding

Advertisements
//www.arvindunimap.com
#include<stdio.h>
int main()
{
float weight,height,bmi;
printf("\nThis is a BMI calculating program:");
printf("\nEnter your weight in kg: ");
scanf("%f",&weight);
printf("\nEnter your height in m: ");
scanf("%f",&height);

bmi=weight/(height*height);

printf("\nYour bmi is: %.2f",bmi);

if (bmi<18.5) 
     printf("\nYou are underweight");
else if (bmi>=18.5 && bmi <=24.9)
     printf("\nYou are normal");
else if (bmi>24.9 && bmi <=29.9)
     printf("\nYou are overweight");
else
     printf("\nYou are obese");
printf("\nThank you for using this program");

return 0;
}

3.Marks grade coding-Part 1

//www.arvindunimap.com
#include<stdio.h>
int main()
{
	float marks;
	printf("Enter your mark for Mathematics : ");
	scanf("%f",&marks);
	
	if(marks>=80&&marks<=100)
		 printf("Congrats you got an A");
	else if (marks>=60&&marks<80)
		printf("You got a B.Try again");
	else if (marks>=40&&marks<60)
		printf(" You have passed with minimal marks.Try again next time");
	else
		printf("You failed Mathematics.Try again next time");
	
	return 0;
	
}
Advertisements

Leave a comment

Knowledge is Power

Design a site like this with WordPress.com
Get started