Skip to content
March 22, 2023

Prajwal Rai Blog

  • Home
  • MY BLOG
    • IT
    • Others
  • C-Program
  • Plus 2
    • Class 11
    • Class 12
  • QBasic
    • QBasic-Basics
    • Patterns in QBasic
    • Numeric Pattern
    • Modular Program
    • Program Design Tools
    • QBasic Projects
  • Web Design
    • HTML AND CSS
    • JavaScript
  • PHP
  • Fundamental
  • About me
Main Menu

Tag: C Program example of while statement

Class 12(C-Program)

Decimal to Binary using while statement in C program

January 15, 2020 - by Prajwal Rai - Leave a Comment

//using while statement #include<stdio.h> #include<conio.h> main() { int n,m,r,p=1,t=0; printf("Enter any decimal number:"); scanf("%d",&n); m=n; while(n!=0) { r=n%2; t=t+(r*p); n=n/2; p=(p*10); } printf("Decimal Number %d=Binary Number:%d",m,t); } DECIMAL To BINARY …

Decimal to Binary using while statement in C program Read More

Recent Posts

  • Write a program in C to enter ā€˜N’ of data using file handling (user choice)
  • Write a program in C to copy file using file handling
  • Write a program in C to display the students of age 20-25 and store in file
  • Write a program in C using structure to enter the id and four different subjects marks of 3 students and display them in proper format along with total and percentage. (Note: Marks should be between 0 and 100)
  • Enter name and post of ‘N’ employees and display using structure in C-Program

Archives

  • March 2023
  • February 2023
  • September 2021
  • May 2021
  • April 2021
  • March 2021
  • August 2020
  • January 2020
  • December 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • October 2015
  • September 2015
Copyright © 2023 Prajwal Rai Blog.
Maintained by Prajwal Rai