In stead of going through different parts of C programming like Data Type, Variables, Functions, Arrays directly, I first Write a simple program and explain how it works so that you get basic concept of writing C program and compile it. I explain line by line code to make you better understand so read the explanation carefully.
Read more »
1: //simple C program2: #include<stdio.h>3: #include<math.h>4:5: int main(){6: float data1;7: float data2;8: float sum;9: float powersum;10:11: printf("Enter First Data: ");12: scanf("%f",&data1);13: printf("Enter Second Data: ");14: scanf("%f",&data2);15:16: sum = data1 + data2;17: powersum = pow(data1,2) + pow(data2,2);18:19: printf("\nThe Sum of Numbers is: %f ",sum);20: printf("\nThe powersum of Number is: %f",powersum);21:22: return 0;23: }24:
تعليقات: 0
إرسال تعليق