Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- double i,f, incr,d,F;
- printf ( "Valor inicial: ");
- scanf ("%lf", &i);
- printf ("Valor final: ");
- scanf("%lf",&f);
- printf("Incremento: ");
- scanf("%lf", &incr);
- d=i;
- if (-100>i || i>100) {
- printf ("Valores invalidos.") ;
- }
- else if ( -100>f || f>100){
- printf("Valores invalidos.");
- }
- else if (incr <0.1) {
- printf("Valores invalidos.");
- }
- else if (i>f){
- printf ("Valores invalidos.");
- }
- else {
- while (d <= f ){
- F= ((d*1.8)+32);
- printf ("%7.2lf --> %7.2lf\n",d,F);
- d= d+incr;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement