cprogramming Programming

C Program to Read Value and Display Surface Area.

  • August 21, 2020
  • 0 Comments

Define int and print the value of the surface area in C programming. If a cube has its side and its volume and surface area given by the formulae v = a3 and s=6a2. Write a program to read “a” and print the volume and surface area. #include <stdio.h>#include <conio.h>void main(){int a,v,s;clrscr();printf(“Enter the value of […]

cprogramming Programming

C – Divide the Number and Find Quotient and Remainder.

  • August 21, 2020
  • 0 Comments

Write a C program to divide an integer by another integer and find quotient and remainder. #include <stdio.h>#include <conio.h>void main(){int a,b,quo,rem;clrscr();printf(“Enter two numbers a&b:”);scanf(“%d%d”,&a,&b);quo=a/b;rem=a%b;printf(“Quotient=%d”,quo);printf(“nRemainder=%d”,rem);getch();}