Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

C/C++: Affichage des nombres à virgule et sans virgule


{filelink=13386}

#include <stdio.h>
int main()
{
    int data[10];
    double twice[10];
 
    int index;
 
    for (index = 0; index < 10; ++index)
	{
        data[index] = index;
        twice[index] =index;
    }
	for(int i=0;i<10;i++)
		printf("int= %d  | double= %.2f",(*data+i),twice[i]);
    return (0);
}

No comments yet.

Leave a Comment