Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main(){
- int num;
- float *temps;
- printf("How many temperatures would you like to read? ");
- scanf("%d", &num);
- temps = malloc(sizeof(float)*num);
- for (int i = 0; i < num; i++){
- printf("Enter a temperature: ");
- scanf("%f", &temps[i]);
- }
- for (int j = num-1; j>-1; j--){
- printf("%f, ", temps[j]);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement