Follow along with the video below to see how to install our site as a web app on your home screen.
Not: This feature may not be available in some browsers.
if text1.text ="0" then
text1.locked=true
c++ kardeş
#include <windows.h>
#include <iostream>
using namespace std;
main () {
int i,n,p;
float ortp,ortn,tn,tp;
int a[10];
tn=0; n=0;
tp=0; p=0;
ortp=0; ortn=0;
for(i=0; i<10; i++){ cout<<"sayilari giriniz=>>>";
cin>>a[i];
if(a[i]<0) {
tn=tn+a[i]; n=n+1;}
if(a[i]>0) {
tp=tp+a[i]; p=p+1;}
}
if(p==0) ortp=0;
else ortp=tp/p;
if(n==0) ortn=0;
else ortn=tn/n;
cout<<ortn<<endl;
cout<<ortp<<endl;
cin.get();
cout << ""<<endl;
cin.get();
return 0;
}
teşekkür ederim kardeş ama bazı karakterleri görmedik biz daha stdio.h,conio.h şeklinde daha bi basit program var mı elinde?Kod:#include <windows.h> #include <iostream> using namespace std; main () { int i,n,p; float ortp,ortn,tn,tp; int a[10]; tn=0; n=0; tp=0; p=0; ortp=0; ortn=0; for(i=0; i<10; i++){ cout<<"sayilari giriniz=>>>"; cin>>a[i]; if(a[i]<0) { tn=tn+a[i]; n=n+1;} if(a[i]>0) { tp=tp+a[i]; p=p+1;} } if(p==0) ortp=0; else ortp=tp/p; if(n==0) ortn=0; else ortn=tn/n; cout<<ortn<<endl; cout<<ortp<<endl; cin.get(); cout << ""<<endl; cin.get(); return 0; }
teşekkür ederim kardeş ama bazı karakterleri görmedik biz daha stdio.h,conio.h şeklinde daha bi basit program var mı elinde?
[COLOR=Lime]#include[/COLOR] [COLOR=Red]<stdio.h>[/COLOR]
[COLOR=Lime]#include [/COLOR][COLOR=Red]<stdlib.h>[/COLOR]
[COLOR=Red][COLOR=Lime]#include[/COLOR] <math.h>[/COLOR]
int main(int argc, char *argv[])
{
[COLOR=DeepSkyBlue]double[/COLOR] a;
printf("bir real sayi giriniz: ");
scanf("%lf",&a);
if(floor(a)<0)
{
printf("sayi negatiftir\n");
}
else printf("sayi pozitif\n");
system("PAUSE");
return 0;
}