Professional Documents
Culture Documents
LAB REPORT
Course Title: Structured Programming Lab
Student Details
Name ID
[For Teachers use only: Don’t Write Anything inside this box]
#include<stdio.h>
int main()
{
int a[10],n,i;
printf("Enter the number : ");
scanf("%d",&n);
for(i=0; n>0; i++)
{
a[i]=n%2;
n=n/2;
}
printf("\n The Binary number is = ");
for(i=i-1; i>=0; i--)
{
printf("%d",a[i]);
}
return 0;
}
#include <stdio.h>
int main()
{
int a[10][10], transpose[10][10], r, c;
printf("Enter rows and columns: ");
scanf("%d %d", &r, &c);
return 0;
}
int sumOfDigits(int num)
{
if(num == 0)
return 0;