//to calculate using while
#include<stdio.h>
#include<conio.h>
void main()
{ int count
float average,sum;
sum=0;
count=0;
while(count<N)
scanf("%f",n)
sum=sum+count
count=count+1
}
average=sum/n
write a c++ program to convert binary number to decimal number by using while statement
A = 5do{statement;A = A + 1;} while (A < 10)
Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.
by this program you can find the factorial: #include<iostream> using namespace std; main() { int n,x,f=1; cin>> n; x=0; while(x<n) { x++; f= f*x; } cout<<"factorial is"<<f<<"\n"; system("pause"); return 0; }
secondary storage
The following cases are all possible:- program without any for and while- program without for- program without while- program with both for and while
write a c++ program to convert binary number to decimal number by using while statement
In the RAM
eleporo
Not used
A = 5do{statement;A = A + 1;} while (A < 10)
int i=0; while (i++<n) { /*...*/ }
Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.
The Google word processor is one component of the Google Documents program. This program can be found on the Google website. The program gets average reviews and is recommended for people who only use word processing once in a while.
Skype headsets are hands-free devices that allow you to hear and talk into a microphone while using the Skype program. They are used to make the Skype users experience easier while doing other things and using the Skype program.
//program to find the factorial value f any number using while loop #include<stdio.h> void main() { int i,n,fact=1; printf("Enter the number\n"); scanf("%d",&n); i=n; while (i>=1) { fact=fact*i; i--; } printf("The factorial value=%d",fact); } the above is a program for calculating tha factorial value of any number which is entered by the user
int num = 1245; //Number to display in binary int pos = log(1425.0f) / log(2.0f) + 1; //calculate # of binary digits while (--pos >= 0) printf("%d", num & (1 << pos) ? 1 : 0); printf("\n");