C Lab Report-1
C Lab Report-1
XAVIER’S COLLEGE
Maitighar, Kathmandu
(Affiliated to National Examinations Board)
C programming
Lab Report
Submitted by:
Bikrant Lekhak
023NEB023
Grade 11 “G”
Submitted to:
Mr. Jaya Sundar Shilpakar
(Lecturer)
Output:
1
Output:
int main() {
int x = 5; int
result;
return 0;
}
2
Output:
return 0; }
Output:
3
Code to take marks of 5 subjects and calculate average.
//code to take marks of 5 subjects and calculate average
#include<stdio.h>
int main() {
float eng, phy, chem, math, comp;
float total, average;
return 0;
}
Output:
4
// It will convert centimeters into metres
m = (float)(c / 100);
5
Code to take user input money in dollar and convert it in Nepali rupees
//code to take user input money in dollar and convert it in Nepali rupees
#include<stdio.h> int
main(){
int c,d;
printf("Enter the dollar money\n");//taking input from the user//
scanf("%d",&d);
c=132*d; //multiplying given input with standard value of $1 in
Rs// printf("The required Nepali rupees is %d\n",c); return 0;
}
Output:
6
Output: