scanf or printf

#include <iostream>
#include <stdio.h>
using namespace std;
//scanf_1.cpp
int main()
{
int n1;
char ch1;
char str1[20];
float f1;
printf("Enter the integer data :");
scanf("%d",&n1);
printf("\nEnter the string data :");
scanf("%s",str1);
printf("\nEnter the float data :");
scanf("%f",&f1);
printf("scanf takes\nInteger Value: %d\nChar:\
%c\nString: %s\nFloat: %f\n"\
,n1,ch1,str1,f1);
return 0;
}