Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IFF - Programação Estruturada
- //Lista de Exercícios 0 - Exercício 5
- #include<stdio.h>
- float dividirNumero(float n){
- do{
- n=n/2;
- }while(n>1);
- return n;
- }
- int main(){
- setbuf(stdout,NULL);
- float n=0;
- printf("Entre com um valor: ");
- scanf("%f",&n);
- printf("O resultado da ultima divisão, que retornou um valor menor ou igual a 1, foi: %.2f",dividirNumero(n));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment