Skip to main content

GeeksforGeeks | Practice | Data Types

 


DATA TYPES

CODE:

void dataTypes(int a, float b, double c, long long l, string d){
   
    float p = b/c; //do b/c
   
    double q = b/a ; //do b/a
   
    int r =  c/a ; //do c/a
   
    long long m =r+l ; //do r+l
   
    cout << p << " " << q << " " << r <<" "<< m <<endl;
   
    cout << d << " " << d[3] << endl; //write 3 for index

}


Input:
1 2 3 5
gfgc
Output:
0.666667 2 3 8 
gfgc c
                       THANKS FOR VISITING
                            ðŸ’–💖💖


Comments